Database Errors
Fix Database Issues
Solutions for common database errors encountered with Customer History.
Table Creation Errors
Error during plugin activation:
Error Message
Error creating tables: Table ‘wp_puredevs_customer_sessions’ doesn’t exist
Solutions:
- Check database user has CREATE TABLE permissions
- Verify database isn’t full or at quota
- Try deactivating and reactivating plugin
- Manually create tables (contact support for SQL)
Connection Errors
Database connection lost:
- Check wp-config.php database credentials
- Verify database server is running
- Test connection with other plugins
- Contact hosting provider
- Check database server status
Query Errors
SQL query failures:
- Enable WordPress debug mode
- Check debug.log for SQL errors
- Note the specific query failing
- Report to support with error message
Common causes:
- Corrupted table
- Missing indexes
- Insufficient memory
- Timeout on large queries
Repair Database Tables
Fix corrupted tables:
- Go to Customer History → Tools → Database
- Click Check Tables
- If errors found, click Repair Tables
- Or use phpMyAdmin Repair function
Memory Limit Errors
Error
Fatal error: Allowed memory size exhausted
Increase PHP memory limit:
In wp-config.php add:
define('WP_MEMORY_LIMIT', '256M');Or contact hosting to increase limit.
Max Execution Time
Queries timing out:
Increase in wp-config.php:
set_time_limit(300);
Or adjust in php.ini:
max_execution_time = 300
Database Optimization
Improve performance:
- Go to Tools → Optimize Database
- Run table optimization
- Rebuild indexes
- Clear old session data
Missing Indexes
Slow queries due to missing indexes:
- Go to Tools → Database Health
- Click Check Indexes
- Add missing indexes automatically
Backup Before Fixes
Important
Always backup database before attempting repairs or optimizations.
Was this article helpful?
Help us improve our documentation by providing feedback