Common WordPress Errors
We all love WordPress, but sometimes it can drive us crazy! Whether its the dreaded white screen of death, an unknown PHP error coming from a plugin, server issues or any other WordPress error causing our site to crash, it’s never fun. But whenever WordPress decides to act up, don’t worry yourself at all – there is always a solution as you’re going to learn in this post. Get ready to have fun because you and me are going to solve 15 common WordPress errors. So without further ado, let’s start with the most common WordPress error.
1. Internal Server Error
Almost every WordPress user I know has encountered the internal server error at least once. It’s quite annoying because, unlike many common WordPress errors, the internal server error does not tell you what you need to fix. This can be frustrating since the error can be a result of several reasons as you’ll see below.
Internal Server Error Causes:
Some of the possible causes for the Internal Server error are the following:
Internal Server Error Solutions:
This error can easily send a beginner into panic mode but worry not, here are some solutions.
a. Edit .htaccess file
Since the internal server error is mainly a result of a corrupted .htaccess file, login into your WordPress root directory via File Manager (or FTP) and rename your .htaccess file to .htaccess.old. Refresh your browser to see if you solved the error. If the error disappeared, go to Settings -> Permalinks and click on the Save Changes button to reset your .htacess and flush write rules. If this does not work, perhaps you need to check your plugins.
b. Deactivate all plugins
A plugin you just installed could be the problem, but that’s great because you know what to uninstall or delete. Other times, this WordPress error may crop up as a result of an old plugin (or several plugins that are incompatible). You won’t know for sure if the problem is your plugins unless you deactivate the plugins.
c. Change Themes
If the problem was not the plugins, perhaps your theme is. Switch to the Twenty Twelve theme and reload your website. If you’re still seeing the error, perhaps you need to upgrade some of your WordPress folders.
d. Repair the wp-admin and wp-includes folders
By this point, you’ve probably solved this WordPress error. But if this is not the case, try replacing your wp-admin and wp-includes folders with newer ones from a fresh WordPress install.
e. Increase your PHP memory Limit
If everything else fails, you have to get down and dirty and mess with a few things on your server. The internal server error can be frustrating, so I don’t expect anything to stop you. Here is a great guide on increasing PHP memory by the good guys at WordPress.If you like taking shortcuts, fire up your code editor and create a text file named php.ini. Inside this file, add this code:
memory=64MB
Save and upload the file to the /wp-admin/ folder. If increasing your PHP memory solves the problem, talk to your web host to put a finger on what is exhausting your memory. It could be anything from broken theme functions to poorly designed plugins among other things. Your web host will furnish you with information from your server logs.
2. Auto-Update Failed
WordPress now comes with an auto-update feature that takes care of security, minor bugs and such like things. The feature is pure genius at work. It’s great but sometimes it fails. Considering the auto-update feature does not require any human input, how do you tell when the update fails? You will see one of the following:
- A PHP error message
- A blank white screen (Also known as the white screen of death – WSOD)
- A warning that says the update failed
Update Failed Causes:
- Internet connection problems during auto-update
- Broken connection with main WordPress files
- Incorrect file permissions
Update Failed Solution:
Update your WordPress website manually. If you don’t know where to start, please check out this Updating WordPress – Manual Update post at WordPress Codex.
3. Syntax WordPress Error
My analysis showed that this is a very common WordPress error among people who add code snippets to their WordPress sites. When you encounter this error, you will usually notice something like:
Parse error - syntax error, unexpected $end in /public_html/your_site/wp-content/themes/your-theme/functions.php on line 38
This error needn’t stress you out for it tells you exactly where to find the problem.
Syntax Error Cause:
Many a time, the syntax error is caused by some missing or unexpected character(s) in the problematic file. Most of the time caused by someone less experienced trying to edit the code in a theme or plugin but it could also occur when you’ve installed a new theme or plugin that contains the error.
Syntax Error Solutions:
a. Educate yourself on pasting code snippets into WordPress
As a WordPress beginner, you have a long (but fun) way to go as far as learning WordPress development is concerned. There is no hurry though, so take your time. If you encountered this WordPress error after adding code snippets into your WordPress website, you need to learn more about pasting code snippets into WordPress or you will cause more damage.
b. Fix the affected code
If this WordPress error occurred after updating a plugin or pasting some code from the web, you know exactly where to look. The problem is you can’t fix your code via Appearance -> Editor (or Plugins -> Editor) since the syntax error locks you out of your website.This doesn’t auger well with most beginners, so they freak out. But don’t be, you can easily edit your WordPress files via FTP or File Manager in your cPanel. Find the affected file and fix the code either by removing it or rewriting it correctly.
c. Try a different theme or plugin
If the error began when you activated a new theme or plugin then it’s most likely an error in that theme or plugin. So you might want to find an alternative one or contact the developer so they can fix the error. In some cases you might not be able to log into WordPress in which case you might have to delete the plugin or theme via FTP.
4. Error Establishing A Database Connection
Of the common WordPress errors, this is pretty self-explanatory. The error lets you know something broke the connection to your WordPress database.
Database Establishing Error Causes:
- wp-config.php error
- Problems with your hosting provider
- You’ve been hacked! And here I was thinking this particular WordPress error is no big deal.
Database Establishing Error Solutions:
a. Edit your wp-config.php file
Access your wp-config.php file via File Manager or FTP and confirm if the database name, host, username and password are correct. If you’re stuck or don’t know what to do first, consider teaching yourself a few things about editing wp-config.php files.
b. Fix issues with your web host
If your wp-config.php is looking right and this WordPress error is still a problem, you should talk to your WordPress hosting provider. They will be able to tell you whether the server is down or your database was shut down for exceeding its quota. If they tell you everything looks good on their end, it is time to implement some WordPress security on your site.
c. Scan your website to determine if it’s compromised
Hackers don’t sleep. No, they don’t. You can fall victim to a hacker anytime, especially if you don’t know how to secure your WordPress website. To ensure your website hasn’t been hacked, scan it using a tool such as Sucuri Sitecheck. If you get bad news, just stay calm and check out this my site was hacked post over at WordPress Codex.
5. Briefly Unavailable For Scheduled Maintenance Error
1, 2, 3… Break time over, let’s try and understand why you’re getting this not-so-brief WordPress error. Oh, by the way, it shouldn’t trouble you at all since it’s quite easy to solve. But first, let’s look at the causes.
Scheduled Maintenance Error Causes:
- Your WordPress update failed because some things are beyond your control
- The .maintenance file was not deleted after the update for one reason or another
Scheduled Maintenance Error Solutions:
Are you having fun? Do you feel you can solve the above errors if/when they crop up? If you can, let’s move on to WordPress error number six (6).
6. Email Password Retrieval Does Not Work
The main cause for this is forgetfulness. Perhaps you should try some memory enhancing diet and exercises ? Kidding aside…we all forget even the most important of things such as passwords, usernames and email addresses? As it were, you forgot your password and were forced to use the “Lost Your Password” page. The problem is you never received the reset link via email. You decide to try again after checking your spam folder but still, no link.
Password Retrieval Error Cause:
For some reason your WordPress installation just won’t send you the link…the cause could be a mystery! But the main problem isn’t why you aren’t receiving your password but how can you actually reset your password easily and quickly? We’ll, below are a couple solutions.
Password Retrieval Error Solutions:
a. Reset your WordPress via phpMyAdmin
This is the more technical of the two solutions I’ll present you with.
- Login into your cPanel and navigate to phpMyAdmin under Databases
- Select your database (Your web host will help you can’t find your database)
- Navigate to wp_users and click on Browse
- Go to your username and click on Edit
- Enter a new value (your new password) into user_pass
- Choose MD5 from the drop-down menu that’s under Function
- Click Go button at the bottom to save your changes
b. Edit your functions.php file
And now for a slightly less technical method. The functions.php file is responsible for many a thing on your WordPress website. If your email password retrieval is giving you a hard time:
- Navigate to “../wp-content/themes/your_live_theme/” using FTP or File Manager and download the functions.php file.
- Open the file in your code editor and add the following code:
wp_set_password('DesiredNewPassword', 1);
Replace DesiredNewPassword with your new passowrd. Number one (1) in the code is your user ID number in the wp_users table.
- Save and upload functions.php
- When you can login into your website, eliminate the code (download functions.php, delete code and upload it back to your theme folder)
7. HTTP Error 403 – Forbidden
If you get “You are not authorized to view this page. (403 error)” message when trying to login into your WordPress website, you’ve encountered one of the most common WordPress errors – the HTTP Error 403.
HTTP 403 Error Cause:
- Problems with Directory Indexes if your blog is hosted on a Windows server
HTTP 403 Error Solution:
Add index.php to the Directory Indexes. You can solve this WordPress error easily by adding index.php to the Directory Indexes. Just go to your Control Panel -> Web Options -> Directory Indexes and add index.php.
8. Sidebar Below Content Error
I was quite perplexed when I first encountered this WordPress error. I was so convinced my theme was completely toast that I contemplated changing it altogether. However, I summoned Google spiders and a few seconds later, I realized this was just one of the most common WordPress errors. This realization took away all the worrying. A few more clicks and scrolls, I found the causes.
Sidebar Below Content Error Causes:
- HTML errors – sometimes you might forget to close a few div elements
- CSS errors – Other times, you might accidentally use disproportionate widths that end up messing up your entire layout
Sidebar Below Content Error Solutions:
a. Close all div elements
In most cases, pen div elements are responsible for this error. Close all open div elements and eliminate extra div elements that pushes the sidebar outside the wrap element. Use a tool such as W3 Validator to check if your HTML code could be the cause of this error.
b. Fix your CSS
Improper width ratios will mess up your layout in turn placing your sidebar below the content area. You need to keep things in proportion. For instance, if your main container is 920px in width, allocate 620px to your content and 250px to your sidebar. Leave the remaining 50px to margins and what not. Just keep things proportional. Another thing, be careful when using the float property.
9. WordPress Admin Displaying Improperly
Have you ever logged into WordPress only to find your WP Admin Dashboard all over the place? What I mean it the links are arranged improperly because the dashboard is rendering without CSS.
Admin Display Error Causes:
- Proxy and Firewalls that black CSS files
- Corrupted admin menu plugins
Admin Display Error Solutions:
a. Ensure you’re not behind a proxy or firewall
If you’re behind a proxy or firewall (maybe you’re accessing your website from work), try accessing your dashboard elsewhere without proxies or firewalls. You can also try purging your firewall and proxy cache and see if that works.
b. Update/Deactivate admin menu plugins
If you are getting this error after installing a plugin such as Lighter Menus and Admin Drop Down Menu for your admin menu , try updating (re-installing) it. If this WordPress error persists, deactivate the plugin.
10. Connection Timed Out Error
If your WordPress website lives on an overburdened shared server, you will see this WordPress error more often than not. The following problems are responsible for this error.
Time Out Error Causes:
- Heavy plugins
- Theme function errors
- Exhausted PHP memory limit
Time Out Error Solutions:
- Deactivate the plugins you installed recently or reset your plugins folder
- Increase your PHP memory limit
- Switch to the Twenty Twelve theme to determine if the problem lies in your theme
11. Warning: Cannot Modify Header Information – Header Already Sent By
This is yet another common WordPress error that troubles many WordPress users, especially beginners. If you do encounter this error, you will usually see something similar to this:
Warning: Cannot modify header information - Header already sent by (Output started at /blog/wp-config.php:34)
That last part (Output started at /blog/wp-config.php:34) tells you exactly where your error is stemming from.
Cannot Modify Header Error Cause:
- Presence of white (blank) spaces in the affected file (in our case above, that would be wp-config.php)
Cannot Modify Header Error Solution:
You’ll need to remove the blank spaces. To get rid of this WordPress error:
- Download the affected file (e.g. wp-config.php) via File Manager or FTP
- Open the file in your favorite editor (e.g. Notepad++)
- Remove all spaces before the first <?php (The first <?php should be in the first line)
- Remove all spaces after the closing ?>
- Save your file
12. The Plugin Won’t Delete Error
Some plugins (and you want to stay clear of such plugins) come with hidden files that become a pain in the neck when you want to delete the plugin. This is a good reason to only download plugins (and themes for that matter) from reputable websites you trust. The problem is you can’t delete the plugin via WordPress Admin and even if you delete the plugin’s folder via File Manager (or FTP), the plugin still appears. Magic? No. Here is the…
Delete Plugin Error Cause:
- The plugin came with hidden or nested files
Delete Plugin Error Solutions:
a. Obtain plugins from trusted sources
Don’t go picking up plugins from all over the place. If you would like to purchase a well-coded plugin, go with reputable sources such as CodeCanyon or WPExplorer. If you’re after free plugins, check out WordPress plugin repository. Prevention is better than cure, right?
b. Deleting the plugin using Secure Shell (SSH)
This solution will only work if you have SSH access to your WordPress site. This is what to do. Login into your blog using SSH and navigate to “../wp-content/plugins/“. Use the Is -aI command to list all your folders, and finally delete the problematic plugin using the rm (folder name) command.
13. WordPress Posts Returning 404 Error
It is frustrating to access every part of your WordPress website but the posts. Every time you visit a single post, you get a 404 error page – and it’s a great pain because posts are the bones and flesh of any WordPress blog.
404 Error Page Cause:
- Problem with your permalink settings
404 Error Page Solutions:
a. Save your permalinks
This WordPress error is easy to resolve so don’t panic – you readers will be able to read your posts in no time. Just go to Settings -> Permalinks and hit the Save Changes button.
b. Fix your .htaccess file
If fixing your permalinks does not solve this error, it is time to edit your .htaccess file manually. Navigate to your WordPress root directory and download the .htaccess file. If it doesn’t exists, create a blank text file and save it as .htaccess. Add the following code to the .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Save and upload the .htaccess to the same location.
14. WordPress Memory Exhausted Error
You know you’ve encountered this error when you see the white screen of death or this error message:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home/username/public_html/your_site/wp-includes/plugins.php on line 36
Memory Exhausted Error Cause:
- A plugin or script is eating up your memory
Memory Exhausted Error Solution:
The easiest answer is to simply increase your allocated memory. To do this, open your wp-config.php file (which is found in your website’s root directory) and add the following code:
define ('wp_memory_limit', '64M');
NOTE: You don’t have to download the file (or any other file) when using the File Manager. You can edit the files right in the File Manager. Talk to your web host if you cannot find the edit option.
15. Fatal Error Undefined Function is_network_admin
I’ve decided to end this post with a simple but very common WordPress error.
Undefined Function is_network_admin Fatal Error Cause:
Undefined Function is_network_admin Fatal Error Solution:
Further Assistance/Resources
If we weren’t able to solve your error or your specific error wasn’t mentioned in this post you can find a list of really great resources below with some more solutions to common WordPress errors and their fixes. If you still can’t find a solution you could always try contacting your webhost to see if they can assist you! WPEngine has been there for us on more then one occasion when we couldn’t fix the issue ourselves!
Conclusion
Here we are. We just revealed 15 most common WordPress errors and showed you how to solve them. We hope this post will come in handy when you encounter a WordPress error. Bookmark this resource (you will most likely need it at some point – although we hope you don’t) and please tell us how you fix common WordPress errors on your website, especially if you have a better and quicker solution to one of the common WordPress errors.