Ever come across a WordPress error that you have no idea how to resolve?
Here are seven common errors you’re likely to come across while working with WordPress and easy solutions on how to fix them.
1. Error: The White Screen of Death
I think one of the most terrifying errors is the white screen of death.
You go onto your site and all you see is a white screen.
Nothing else.
Now what?
This usually occurs due to a theme conflict or incompatible plugin. If you have recently changed theme, added a plugin or updated your site and all you see is a white screen then that’s probably the issue.
It could be that two WordPress plugins are conflicting with one another or there’s an outdated plugin installed on your site, which can be more difficult to figure out.
There could also be an error in the PHP code in your theme or your site may not have enough memory.
You could enable debugging mode to see the details about what is causing the error.
Fix: White Screen of Death
If you can still access your WordPress admin panel, login to the backend of your site and deactivate your theme and plugins. Do this one by one until you’ve found the one causing the issue.
Once you’ve found the plugin causing the problem, you can delete it and find a suitable replacement. If it’s your theme causing an issue, you may need to contact your theme developer or swap to another theme.
If it’s a PHP error, you’ll need to find the incorrect code by following instructions under “Error: Syntax or Parse Error” below. Similarly if you have insufficient memory, follow the steps under “Error: Insufficient Memory” below.
2. Error: Maintenance Mode
When you update your site, it gets put into maintenance mode and creates a temporary .maintenance file. This file shows a message on the frontend of your site letting users know that it’s briefly unavailable. If you try to access your site and you still see this message, it’s usually because the maintenance file hasn’t been properly deleted after the updates are complete.
Fix: Maintenance Mode
To fix this error, you’ll need to access your site via FTP. Find the .maintenance
file and delete it.
3. Error: Establishing Database Connection
Sometimes you may see a message stating that there’s been an “error establishing a database connection”. This error could have to do with incorrect database details in your wp-config.php
file, internal problems with your web host, exceeding your database limit or even a hack on your site.
Fix: Error Establishing Database Connection
To fix this, login to your site via FTP and locate your wp-config.php
file. Make sure your database name, username, password and database hostname of your server have been entered correctly. You’ll find these details through your hosting company.
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'database_name_here' );
/** MySQL database username */
define( 'DB_USER', 'username_here' );
/** MySQL database password */
define( 'DB_PASSWORD', 'password_here' );
/** MySQL hostname */
define( 'DB_HOST', 'localhost_or_DatabaseHost' );
If the details are correct, check with your host to see if there are issues on their side, or if you’ve surpassed your resource limit.
4. Error: Insufficient Memory
Depending on your host package and server configuration, you may not have enough memory allocated to your WordPress site to upload media, install plugins and make customisations. If this is the case, you may see an “allowed memory size of xxxxxx bytes exhausted” error.
Fix: Insufficient Memory
If you’re receiving an insufficient memory error then you need to increase your PHP memory limit. To do this login to your site via FTP and find your wp-config.php
file, add the following line of code:
define( 'WP_MEMORY_LIMIT', '64M' );
You can change the 64M to 96M, or whatever memory you require. You may need to check with your host provider about your memory limits.
5. Error: Syntax or Parse Error
This error usually only occurs when you’ve made some code changes to your site, which makes it pretty easy to resolve. If you’ve recently added any code to your site and see this error, then it’s likely that there is a mistake within that code.
Fix: Syntax or Parse Error
The simplest way to fix this error is to simply delete the incorrect code.
If you can’t access your WordPress dashboard then you’ll have to login to your site via FTP. You can then edit the file you’ve added code to and remove the error. Your site should be back to normal then.
6. Error: Connection Timed Out
This can be a pretty common error where the connection cannot be maintained due to a badly configured or overloaded server. This usually happens when a site is trying to do more that the server can handle like high traffic spikes or too much media being browsed.
This mostly happens when the website is trying to accomplish tasks that are a lot more to handle than the server can take. These are called server errors and sometimes can require you to contact your host.
Fix: Connection Timed Out
If it’s a server error, you’ll probably need to contact your web host for details. If it’s an issue with your plugins, you’ll need to deactivate and reactivate them one-by-one to try find the issue. Increasing your PHP memory limit may also help to resolve this error, and you could also ask your web host to increase the maximum execution time in your php.ini
file.
7. Error: Sidebar Shows Below Content
While tweaking your WordPress theme and adding content, you may notice your sidebar showing below the main content area of the page. This is usually a problem with closing HTML tags (like not closing the tag properly) or exceeding the default content or sidebar dimensions.
Fix: Sidebar Shows Below Content
If you’ve recently made a change to the theme file, go back and check that your divs and other tags are properly closed (like <div> ... </div>
) and anything that you’ve put in your sidebar is properly sized.
Conclusion
These are only a selection of the most common WordPress errors you might come across. If you’re having a problem with WordPress and you can’t find an answer in the WordPress codex or support forums, feel free to ask me.