Fix WordPress problems: the most common errors
WordPress is generally stable, but sometimes something goes wrong. A white screen, an error message or a site that no longer loads. In this article I cover the most common WordPress problems and how to fix them.
The white screen (White Screen of Death)
A completely white screen is one of the most frustrating problems. You don't see an error message, just a blank page. This is often caused by a PHP error, a plugin conflict or insufficient memory.
Solution 1: disable plugins via FTP
- Connect to your hosting via FTP (FileZilla or the File Manager in DirectAdmin)
- Go to wp-content/plugins
- Rename the "plugins" folder to "plugins_backup"
- Reload your site
Is your site working again? Then a plugin is causing the problem. Rename the folder back to "plugins" and disable plugins one by one in WordPress until you find the culprit.
Solution 2: increase the PHP memory
Add this line to your wp-config.php file:
define('WP_MEMORY_LIMIT', '256M');
You can also adjust the PHP settings in DirectAdmin to allocate more memory.
Solution 3: disable the theme
- Go to wp-content/themes via FTP
- Rename your active theme folder
- WordPress automatically switches to a default theme
Error establishing a database connection
The message "Error establishing a database connection" means that WordPress can't connect to the database. This can be caused by incorrect login details or an overloaded database server.
Check wp-config.php
Open wp-config.php and check these lines:
define('DB_NAME', 'your_database');
define('DB_USER', 'your_user');
define('DB_PASSWORD', 'your_password');
define('DB_HOST', 'localhost');
You'll find these details in DirectAdmin under MySQL Databases. Are they incorrect? Correct them and save the file.
Repair the database
Temporarily add this line to wp-config.php:
define('WP_ALLOW_REPAIR', true);
Then go to: yoursite.com/wp-admin/maint/repair.php and click "Repair Database". Remove the line again after the repair.
500 Internal Server Error
A 500 error is a general server error. With WordPress, this is often caused by a corrupt .htaccess file or plugin conflicts.
Restore the .htaccess file
- Connect via FTP
- Rename .htaccess to .htaccess_backup
- Reload your site
- Go to Settings > Permalinks in WordPress and click Save Changes (this creates a new .htaccess file)
You can read more about this file in our .htaccess guide.
WordPress admin not accessible
Can't log in to wp-admin? This can have several causes.
Forgot your password
Use the "Lost your password?" link on the login page. No access to your email? Then you can change the password via phpMyAdmin:
- Open phpMyAdmin in DirectAdmin
- Select your WordPress database
- Open the wp_users table
- Click "Edit" next to your user
- Enter a new password in the user_pass field and choose MD5 as the function
- Click Go
Blocked after too many login attempts
Security plugins such as Wordfence can block your IP after several failed login attempts. Temporarily disable the plugin via FTP or wait until the block expires.
Site loads slowly
A slow WordPress site can have many causes: too many plugins, no caching, large images or a slow server.
Quick fixes
- Install a cache plugin - LiteSpeed Cache works excellently on our servers
- Optimize images - Use a plugin such as Smush
- Remove unused plugins - Every plugin adds overhead
- Update PHP - Newer PHP versions are faster
Plugin or theme update failed
Updates can fail because of file permissions or insufficient disk space.
Solution
- Check in DirectAdmin whether you have enough disk space
- Try the update manually: download the plugin/theme, unzip it, and upload it via FTP to wp-content/plugins or wp-content/themes
- Delete the old version and rename the new folder to the original name
Prevention is better than cure
You can prevent most WordPress problems with good maintenance:
- Make regular backups
- Keep WordPress, themes and plugins up to date
- Use a security plugin
- Test updates on a staging environment first
Can't figure it out? At Theory7 we're happy to help. Contact our support and we'll work out the solution together.
Frequently asked questions
How do I know which plugin is causing the problem?
Disable all plugins and activate them one by one. The plugin after which the problem returns is the culprit.
Can I restore my site without a backup?
Sometimes, depending on the problem. But without a backup you're relying on luck. That's why you should always make backups.
My site has been hacked, what now?
Restore a backup from before the hack, change all passwords, update everything and install a security plugin. If in doubt, contact support.
Do I need to reinstall WordPress?
Rarely. You can solve most problems by disabling plugins, restoring files or repairing the database.
0 van 0 vonden dit nuttig