WordPress is a popular CMS for many reasons. In addition to being free, versatile and extremely user-friendly, WordPress is among the most stable of the available blog platforms. Still, there are times when you may have to troubleshoot a WordPress problem.
To identify the problem, you need to know whether the problem is with a WordPress plugin, Theme or during installation for example, or with a built-in WordPress feature such as the text editor. Write down the error message you receive, or the incorrect behavior you observe like 503 service unavailable error.
Read More: How To Test Your WordPress Site For Errors
This guide contains information on solving common WordPress problems, dealing with comment spam and even troubleshooting problems with design and layout. So, let’s explore the errors and their solutions one by one below.
- Fix White Screen of Death Errors
- Fix Headers Already Sent Error
- Problem: Page Comes with Only PHP Code
- Problem: Cannot Connect MySQL Database
- Cannot See Posts, All It Says is Search Doesn’t Meet Criteria
- Problem: I Want to Make My Blog Totally Private
- Problem: I Don’t Receive The Emailed Passwords
- Problem: I Am Getting A Lot of Comment Spam
- Troubleshooting Themes
- Troubleshooting plugins
- WordPress Admin Interface Errors
- Extra contraction marks error in new WordPress posts
- Fix hfeed Error: At least one field must be set for HatomEntry
- WordPress IO Error Uploading Images
- Fix WordPress Upgrade Error | Allowed Memory Size Exhausted
Most Common WordPress Errors
1. Fix White Screen of Death Errors
Both PHP errors and database errors can manifest as a white screen, a blank screen with no information, commonly known in the WordPress community as the WordPress White Screen of Death. [The White Screen of Death]
WordPress users, at many times, encounter some errors called white screen of death. This error shows a white completely black-white screen. To figure out what the problem is can take a lot of time but we are about to tell to some quick ways to restore your website. The mentioned fixes can contain some coding or use of plugins as well.
For troubleshooting purposes, wp-config is your friend in need. To enable the debugging mode, you will have to add some lines of code. Debugging mode displays all the errors on your website in a list. For sites on local access just add the following code to your wp-config file:
define( 'WP_DEBUG', true );
And place it above this line in your wp-config file:
/* That's all, stop editing! Happy blogging. */
If WP-DEBUG is already written in the wp-config file, then set it to “true” excluding the quotation marks.
For live websites, try not to use this code as it will display all the errors as well as root server file path and other important information on the homepage which can put a bad impression on the visitors and also put your website under threat. Use the following code for debugging a live site:
// Enable WP_DEBUG modedefine('WP_DEBUG', true); // Enable Debug logging to the /wp-content/debug.log file define('WP_DEBUG_LOG', true); // Disable display of errors and warnings define('WP_DEBUG_DISPLAY', false); @ini_set('display_errors',0); // Use dev versions of core JS and CSS files (only needed if you are modifying these core files) define('SCRIPT_DEBUG', true);
2. Fix Headers Already Sent Error
Sometimes, when you point your browser to the blog, you may get an error that displays “headers already sent” message on your page. The whole page may look scrambled and it will not function.
WordPress uses PHP session functions. If anything is displayed before these session functions, which may even be a blank space, then the session functions will not work properly because your browser has already received all headers and it starts displaying the output. In such circumstances, this error may occur.
You have to figure out where the error has occurred. Most of the time, it is a file that you have edited manually. If you remember, you edited the
wp-config.php file while installing WordPress. Open the file with your text editor and make sure that there is nothing before the
<? at the first line and after the
?> at the last line. Now save this file, upload it to your WordPress directory, and refresh your page again.
3. Problem: Page Comes with Only PHP Code
This could only happen when your server cannot parse PHP properly. This is a problem of your server configuration; either PHP is not installed on your server or it is not configured to function properly. To solve this problem, contact the system administrator for your server or try installing PHP.
4. Problem: Cannot Connect MySQL Database
If you surf the web quite often then you must have seen one-liner: Error Establishing Database Connection at least once. This one-liner is actually an error which prevents you from getting the desired result. It may frustrate you, but it is even more frustrating for any owner of the website. If you are a WordPress beginner, you are more likely to come across this error. In case, the above message appears, it means your website is not working and you are losing traffic causing a loss in the lead generation and ultimately causing a loss of revenue.
Now the problem is how this error can be fixed. Moreover, what does the Error Establishing Database Connection exactly mean? How could it be avoided in WordPress?
To solve this problem, open your
wp-config.php file and check whether the database parameters are correct. If you are sure that these settings are fine, please check if the MySQL daemon/service is running properly. If MySQL is not running, run this service. If MySQL was running, try restarting the service.
In MySQL version 4.1 and later, password encryption settings have been changed a bit, so PHP cannot connect to some versions of MySQL. If you are sure that your database parameters are fine and MySQL is also running, then connect to MySQL using your MySQL command-line tool and apply these commands:
set password = OLD_PASSWORD('your_current_password'); flush privileges;
This will use old encryption of passwords so that PHP can connect to MySQL. For example, let’s assume my current database password is
rootwith new encryption settings. I want to change it to old encryption settings.
Following are some basic and common problems that you may face while using WordPress. Also, read this wonderful guide to solving 502 Bad gateway error.
5. Fix: Cannot See Posts, All It Says is Search Doesn’t Meet Criteria
This could happen because of caching. For example, you have searched once and WordPress stored the search result inside its cache. So every time you visit the page you see the old result. You can solve this problem by clearing the cache and cookies from your browser. For this problem, you may also check
index.php for errors.
6. Problem: I Want to Make My Blog Totally Private
If you are running your blog for a personal and private group or for your own official department so that only members of your group can see it, then you would want to secure it with some kind of authentication. All you have to do is modify your
.htaccess file to enable basic HTTP authentication. For that, you have to create the
htpasswd file using the
htpasswd command in Linux. If you are using Windows, then search in Google for
htpasswd.exe and download it from a reliable location.
Let’s create the
htpasswd file by applying the following command in your command line:
htpasswd -cm .htpasswd myusername
htpasswd command is a command-line tool available in all Linux distributions by default. Immediately after applying this command, the command-line tool will prompt you for a password; type your password. Please note that an
htpasswd file containing the encrypted password has been created in the current working directory for user ‘username’. Copy that file to your WordPress folder. The
htpasswd file itself is of no use, until you tell Apache what to do with it. So let us create a
.htaccess file in your WordPress folder with the following content, which will tell Apache to turn on basic HTTP authentication using that
AuthType Basic AuthName "Restricted Area" AuthUserFile "absolute_url_of_your_.htpasswd_file" require valid-user
Save this file inside your WordPress directory as
.htaccess. Now whenever you browse this WordPress URL using your browser, it requires the username and password that you created previously. You must supply the absolute URL of the
htpasswd file in the
.htaccess file; it will not work with a relative URL. For example, if your WordPress folder is located inside the
/home/youraccount/public_html/wordpress folder, then the location of the
.htpasswd file should be
If you have trouble retrieving this absolute path, then please don’t worry. Create a PHP file inside this WordPress folder with the following code:
<? php info(); ?>
Now run this file. You will see a page with a lot of text. Search for the text
_SERVER["DOCUMENT_ROOT"], and you will find the absolute URL of this folder on the right-hand side of it.
7. Problem: I Don’t Receive The Emailed Passwords
This problem may happen if your web server has no SMTP server installed, or if the mail function is explicitly disabled. Please contact your system administrator or try installing Sendmail (or any other mail server) properly. It should work.
8. Problem: I Am Getting A Lot of Comment Spam
You have already got an idea how people can misuse some very useful features of a blog engine, like trackbacks and comments, for advertising purposes and spamming. So all you have to do is start fighting with spams. No doubt, it’s very tough to make some automated programs or routines that can detect something as spam because spams don’t always fall into a specific category. Moreover, spammers are also clever.
For more to detail about getting rid of spammers look at “How to Maintain Your WordPress Site” and “Stopping spam with reCAPTCHA”.
Once WordPress is up and running, people often encounter issues with things like themes. For example, they might want the date to show up in the theme and when it doesn’t by default, they can’t figure out why. Other problems might have something to do with folder permissions that prevent them from uploading images.
9. Troubleshooting Themes
Put the blog back into the default theme. Go to Dashboard -> Appearances -> Themes -> Find the Twenty Seventeen theme (or Default Theme) and select activate.
If your current theme has more than one sidebar, I highly suggest moving your custom widgets into the inactive widgets area (careful not to drop them in the available widgets area) to protect them from any possible confusion when the sidebar they are in is not present in the TwentyTen theme. If your current theme is a single sidebar there’s usually no need for this.
10. Troubleshooting plugins
Often, you will notice that problems arise for plugins after a large update to the entire WordPress platform. In any case, the following are a few tips to try if you encounter any problems getting your plugins to run. My plugin stops working after an update—Check the Plugin’s website (listed in the Plugin Browser) to see if any known issues exist.
I can’t find the plugin in my Plugin Browser—Make sure you uploaded it to the correct folder: wp-content/plugins.
Check the plugin’s version compatibility—There is a chance that the plugin just won’t work with a new version of WordPress; if this is the case, hopefully, the developer will release an update soon.
My plugin says I don’t have permission to X folder—Permissions are settings on files and folders that either allow or disallow a user to write to them. You can learn more about setting permissions at WordPress Codex.
My plugin should be showing X on my post, but it’s not—Many times, a plugin requires you to place a custom tag within your post to “trigger” the plugin; read the plugin’s installation documentation.
I can’t find the answer on the plugins’ website—A quick google search for “problems installing [PLUGIN NAME] on WordPress” will lead you to an answer. You can also check the forum link on the plugin’s homepage in the plugin directory at https://wordpress.org/plugins/.
Google didn’t give me the answer I was looking for—Search WordPress’s plugin directory for a different plugin.
I hope you also learned that while WordPress can rock your world, It can also be dangerous and should always be handled with care. There are many benefits to using WordPress and some will only be beneficial to plugin developers, while others exist purely as workflow enhancers for content producers.
11. WordPress Admin Interface Errors
If you are facing any issue with WordPress admin panel, for example, The load time which is taking more than 10-12 seconds, following are the few step that can help you to solve this issue.
- Maybe your installed WordPress’s PHP files are stalled for memory by various instances of WordPress. This could be fixed by editing the PHP configuration settings to allocate more memory. Further, reading about 500 internal error can help to solve this issue.
- This error may be due to database queries that can make your WordPress admin slow. Although I am uncertain if this could be the cause, but by using a lot of plugins which can be responsible for that. Detail about the solution can be found at the following link: How to remove error creating WordPress Plugin without Login.
- In case still, the problem exists than exported your WordPress files to a .XML and delete everything from old installation, then do a fresh installation of WordPress, after installation, imported .XML output file back into WordPress, and now hope your WordPress admin would work like a charm
12.Extra contraction marks error in new WordPress posts
After migrating your WordPress site to a new hosting company, or for some other reasons you see extra quotation marks in every word such as “you’ll” or “don’t”. Not only in the new post you see quotation marks are becoming doubled. But also, older posts that were okay before, are now showing extra contraction marks.
This error you can see if you are copying and pasting from another program such as MS Word or something like that? When copying from elsewhere click the appropriate icon (5 or 6).
A pop-up box will appear. Paste the copied material into it and click “Insert”. The cleaned up version of the HTML markup will appear in your post.
First of all, check and make sure you have enabled this > Settings > Writing > Formatting
__ WordPress should correct invalidly nested XHTML automatically.
Scroll down and click “Save Changes”.
There is one more solution by editing your theme’s Function.php file.
remove_filter ('single_post_title', 'wptexturize'); remove_filter ('bloginfo', 'wptexturize'); remove_filter ('wp_title', 'wptexturize');
To remove it from other places as well:
remove_filter ('category_description', 'wptexturize'); remove_filter ('list_cats', 'wptexturize'); remove_filter ('comment_author', 'wptexturize'); remove_filter ('comment_text', 'wptexturize'); remove_filter ('the_title', 'wptexturize'); remove_filter ('the_content', 'wptexturize'); remove_filter ('the_excerpt', 'wptexturize');
13. Fix hfeed Error: At least one field must be set for HatomEntry
During testing the Google Rich Snippet Tool, If you see a warning of hatom-feed shows up in the Extracted structured data section. This happens because the tool is unable to extract the information “entry-title”, “updated” and “author” from the website or webpage you are testing.
It will display the following warning errors if the tool is unable to extract information from all these three fields from the tested webpage:
hAtom is a microformat for identifying semantic information in weblog posts and practically any other place Atom may be used, such as news articles. hAtom content is easily added to most blogs by simple modifications to the blog’s template definitions.
If you are using a theme from Themify the things had to be a bit different.
How to Fix Warning: Missing required field “entry-title”:
If you are using any other WordPress theme, you need to modify index.php or single.php in their theme folder to remove this warning. Make sure the title of your post which is mostly enclosed in header tags, it must include the class attribute and make sure it has a class attribute then append “entry-title” without quotes to it.
Now open index.php and single .php file for your theme and find the title tag. If it is not enclosed in header tag then wrap it into a header tag and add a class attribute with value “entry-title”.
<h1 class="entry-title"><?php the_title(); ?></h1>
How to Fix Warning: Missing required field “updated”:
To resolve this warning error, make sure that the date of published content must be enclosed with a span tag with an attribute.
Now find the the_time or echo get_the_date(); in your single.php and index.php file and wrap it with a span tag with a class attribute.
<span><?php echo get_the_date();?></span>
There is an alternative option you can try the following example:
<span><?php the_time(); ?></span>
How to Fix Warning: Missing required hCard “author”:
To rectify and resolve this hCard “author” warning, make sure author name must be included in a span tag as follow:
<span> <span>Author Name</span> </span>
Find the the_author(); or the_author_posts_link(); in installed theme file (index.php or single.php) and do the following changes in it:
<span> <span><?php the_author(); ?></span> </span>
<span> <span><?php the_author_posts_link(); ?></span> </span>
After doing all these changes in your theme files, If the problem still persists, feel free to contact us for solving the issues.
14. WordPress IO Error Uploading Images
There are a few different reasons for this error to occur. When I update the flash player, and WordPress flash uploader shows IO error. I think other WordPress users have encountered this issue. In the following simple solution, I’ll show you what I did to address the problem and get my WordPress Image uploads to work.
There is one Simplest Solution: Do not use Flash uploader. Use Browser Uploader.
So I tried that instead of the original Flash upload thing and I was able to upload my pictures. Hope this works for anyone else who’s getting this error!
15. Fix WordPress Upgrade Error | Allowed Memory Size Exhausted
WordPress is updating continuously and might have been done in order to address some security settings. It seems a new problem has been pretty common with the automatic upgrade feature of WordPress.
When trying to automatically upgrade a WordPress blog, it wouldn’t work and I saw an error message similar to this: Allowed memory size of 33554432 bytes exhausted. It seems the error is pretty common and I found the solutions on the WordPress.org support forums. In my case, it was an active plugin causing the problem. I started deactivated one plugin at a time and trying the automatic upgrade after each one. It wasn’t until the 8th deactivated plugin, Contact Form, that the automatic upgrade worked.
So if you are getting the same type of error you most likely have an offending plugin or group of plugins and I suggest deactivating all plugins before the upgrade. You can also try what I did and see what plugin is causing the problem. Keep in mind it might not be just the last deactivated plugin but the combination of two or more plugins.
Another solution that I didn’t try but others have had success with is increasing the WordPress memory limit. To increase the memory limit add this bit of code in the wp-config.php file right after the opening PHP statement:
If you don’t know how to edit a core WordPress file, ask me below in the comments and I will try to help you out.