The Most Common WordPress Errors with Their Solutions

Total
1
Shares
Fix Common WordPress Errors

One of the main reasons why web developers widely use WordPress is because it is easy to use and reliable. However, it doesn’t mean that this content management system is free of error. Users may encounter various issues while using WordPress to create and run their websites.

These errors can be confusing, especially for beginners. Fortunately, most issues commonly occurring while using WordPress can be fixed with relatively simple methods.

WordPress is a popular CMS for many reasons. In addition to being accessible, versatile and extremely user-friendly, WordPress is among the most stable of the available blog platforms. Due to its great accessibility and the numerous functionalities it offers, like visual editors, WordPress is now probably the most popular, powerful and easy-to-use website and blogging content management system. Millions of people have used WordPress over the years either as a presentation site to boost their business or as a way to build their personal brand through blogging. Still, there are times when you may have to troubleshoot a WordPress problem.

Having said this, however mighty this website builder may seem, it’s definitely not infallible and its users know it. If you’ve been using WordPress, you’ve probably already hit a few proverbial walls in the form of server errors and WordPress issues that left you feeling clueless and powerless.

To this end, what you need to know is that you’re not the only one experiencing these error messages and that there is a way to fix them. Fortunately, WordPress offers all the tools and resources you need to get out of the rut – WordPress Support comes either as a free helping guide or as paid services (personal, premium or business).

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

In this article, we will learn about some of the most common WordPress errors and how to resolve them correctly. This guide contains information on solving common WordPress problems, dealing with comment spam, and troubleshooting design and layout problems. So, let’s explore the errors and their solutions one by one below.

Most Common WordPress Errors

1. Fix White Screen of Death Errors

Beginners are often puzzled and just a little bit terrified by this one since it gives absolutely no clues as to what could’ve gone wrong. Basically, this is just a white screen that displays no content or even an error. This WordPress white screen of death can be daunting to deal with especially for WordPress amateurs.

This has most likely happened as a result of incompatibility with a plugin or theme to quickly check this deactivate all plugins. This sounds simple, but the way it works can be more complex and you need to investigate the underlying condition. It can be that two WordPress plugins are in conflict with one another or that you are using a plugin that is already outdated for the newer versions of WordPress. This can also happen if you modify any of the PHP code in your WP site or if there isn’t enough PHP memory.

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.

The way to fix this is to isolate your plugins to check if they are indeed the issue. You can do this by going straight to your ‘plugins’ folder and rename it so that you know it’s the older version. You then need to create a new plugins folder and copy the plugins from the initial folder to this newer folder one by one. This is a sure way to see which of them is working fine and which of them was actually trouble in disguise. These plugins can be for RSS feeds, pretty permalinks and anything really so you never knows which one is causing the issue till you test it.

The process for themes is even more straightforward. You simply need to go back to the default theme – if your website suddenly reappears, it’s because it was in conflict with a plugin or it had some bugs of its own.

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);

Remove the last line of the code if you had not made any changes to your website’s javascript or CSS files before the white screen error appeared. Live sites can check out the error log at wp-content/debug.log while the local sites can apparently see the error list on the front-end and then see where the problem originally lies.

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: Error Establishing Database Connection

Unlike the above-mentioned White Screen of Death error, this one pretty much says everything you need to know about what went wrong. This basically informs you about the connection with the database, which for one reason or another has been compromised.

There are several reasons for which this could’ve happened and the most common of them are: issues with your hosting server, an error in your wp-config.php file or, the slightly less frequent reason, a hack on your website.

Let’s take them one step at a time. Your best bet in solving any internal server errors is to speak directly to your hosting provider. They should know whether the server has indeed come up against some problems or if your database exceeded its quota and that’s why it keeps shutting down. On the other hand, if they’re not aware of any such issues, you need to start considering the wp-config.php file as your most likely culprit.

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?

error database connection

In order to check this, you need to access the wp-config.php file through the file manager or by using FTP. What you need to do here is to check if the basic information is correct. Look at the host, database name, username and password fields. Editing PHP files does require some basic knowledge, so make sure you get accustomed to it before you proceed or you might see some error messages or fatal errors coming your way.

Lastly, in case the first two scenarios have not proved responsible for your database connection error, consider investigating for any hacks. Since it’s so popular and widely used, WordPress can be a very sweet target for mischievous hackers. All you need to do is to use a security tool and see if your website was picked as such a target. Don’t fret if this is the case – simply change your login information and start over with the website. The backup should have you up and running again in no time.

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.

Connection Timed Out

This is another common error and it points out the fact that a connection could not be maintained due to a badly configured server or an overloaded one.

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.

And again, the problem may be with your plugins. Try deactivating them all and reactivating them one by one to see which one was behind the issue. The same goes for the theme – if this turns out to be the problematic factor, just switch back to your default one.

Alternatively, you can also increase the PHP memory limit. The easiest way to do this is by asking your web host to do this for you.

Maintenance Mode Error

The content for this error will say the following: ‘Briefly unavailable for scheduled maintenance. Check back in a minute.’

This is a relatively straightforward and easy-to-solve issue. The way it works is that a new .maintenance file is created by WordPress each time you upgrade it to a new version. This file is typically automatically removed each time by the website builder platform, but there are cases when it does not succeed to do so – especially when it hasn’t successfully managed to complete the upgrade.

The quick way to fix this is to delete this file yourself after you locate it in the WP root directory folder via FTP.

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 search.php and index.php for errors.

Most beginners may face this sidebar problem while they work with WordPress – your sidebar will show below the content of the page. This is a problem with your HTML or CSS – additionally, you may have closed the div tag twice or missed closing it while customizing your theme.

Fortunately, this issue is really easy to fix, as well. You just need to go back to your customizations and remove or add the div tag to see if anything changes for the better.

Another possible reason is when the theme you’ve chosen has certain default sidebar dimensions that you may have disregarded.

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

This 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 htpasswd file:

 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 /home/youraccount/public_html/wordpress/.htpasswd.

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.

find server document root

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.

  1. 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.
  2. 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.
  3. 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).

Visual editor toolbar

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”.

How to Fix: Extra contraction marks error in new WordPress posts

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 Feed Warning

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.

<span>Date</span>

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>

or

<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.

Browser-uploader

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:

define('WP_MEMORY_LIMIT', '256M');

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.

Internal Server Errors

Internal Server Error, also known as 500 Internal Server Error, is one of the common HTTP status codes. It indicates that the server found something wrong but is unable to identify its exact cause. This error can be confusing since it is up to you to pinpoint the source and resolve it.

There are several steps administrators can take to troubleshoot Internal Server Error.

Checking the .htaccess File

A corrupted .htaccess file can be the cause of the 500 Internal Server Error. Use an FTP or the file manager on your hosting control panel to access this file. The .htaccess file is typically located in the root directory of your WordPress site.

Try renaming this file into something like .htacces_1. After that, go to the Permalinks section on your WordPress admin area and click the save button to generate a new .htaccess file. Refresh your site and see if it fixes the problem.

Increasing the PHP memory limit

The PHP memory limit is the maximum amount of server memory that each PHP script can use. When you exhaust this limit, it can cause an internal server error when you try logging into your WordPress admin or uploading an image.

You can temporarily increase this limit by uploading a php.ini file containing the script memory=64MB into your /wp-admin/ folder. If this fixes the problem, make sure to contact your hosting provider to find out the exact element that exhausts your PHP memory limit.

Deactivating all Plugins

Sometimes the internal server error can be caused by a specific plugin or several plugins that don’t work well together. The easiest troubleshooting method for this case is by deactivating all your installed plugins at once.

If it resolves the error, it is safe to assume that one of your plugins is the source. Reactivate your plugins one by one to pinpoint the exact one that causes the error.

Re-uploading the Essential Files

Replacing the core files in your WP installation can be a way to resolve this problem. However, you wouldn’t want to remove all your information by reinstalling the entire WordPress. Fortunately, there is a workaround.

Visit the WordPress.org website and download a new WordPress installation zip file. Extract the zip file and find wp-admin, wp-includes, wp-content folders inside it. Upload these folders into your WP root directory and overwrite any existing files. This method may fix the error if your WP installation files are corrupted.

Contacting Customer Support

If any of the above methods don’t resolve your internal server error, your last option is to contact the hosting provider. The customer support team can help you pinpoint the root cause of this problem by checking the server logs.

504 Gateway Timeout Error

The 504 error code may occur when a proxy server encounters a problem while attempting to connect with the upstream server. This might be because the proxy server timed out while waiting for the upstream server to respond.

There are several ways to solve the 504 gateway timeout error, including refreshing the browser, flushing DNS, trying a different web browser, and checking your WP plugins.

Syntax Error

Syntax or Parse errors appear when there is an incorrect syntax or missing character in your WordPress code. This usually happens after you add a code snippet to WordPress either by typing it manually or pasting the code from the internet.

The error message will indicate an unexpected error in your code and specify the file location and the line where the error occurred. This makes identifying syntax errors relatively easy.

The administrator needs to correct the wrong code snippet or replace the file altogether to resolve this error. Even though syntax errors may seem trivial, in some cases, they can lock you out of your dashboard and break your site.

Conclusion

Even though WordPress users may encounter errors while using this CMS for their websites, most of these issues are easily fixable. The key is knowing the most common causes of these errors and the best way to handle them.

In this article, we have looked at the nine WordPress errors you might encounter, including:

  • Internal server errors
  • 504 gateway timeout error
  • Syntax error
  • Database connection
  • 404 error
  • White screen of death
  • Sidebar below content error
  • White text and missing buttons
  • Broken media issue

We also learned the easiest ways to resolve these errors. Follow the steps presented in this article, and hopefully you can continue utilizing this versatile CMS and easily handle any errors when they occur.

These are some of the most common WordPress challenges that any beginner might face at any point when working with the platform. The important thing to know is that any bug or issue also has a solution – WordPress is so popular that every possible issue has already been tackled by the developers and simplified for the general public to understand.

 
 
1 comment
Leave a Reply

Your email address will not be published. Required fields are marked *

Sign Up for Our Newsletters

Get notified of the best deals on our WordPress themes.

You May Also Like