10 of the Most Common WordPress Errors and How to Fix Them

WordPress-Errors

WordPress may be easy to use, but it can also be daunting for beginners who have not quite gotten the hang of it. If you are starting a WordPress blog, it may benefit you to learn about the most common WordPress errors ahead of time and familiarize yourself with how to fix them. Let’s take a look at 10 of the most common WordPress errors.

1. The Syntax Error

If you try to add code snippets into WordPress but accidentally miss something, you will see a PHP error that reads “Parse error – syntax error, unexpected $end” followed by a URL. Usually the error is a missing bracket or an unexpected character in the code.

2. The Internal Server Error

“Internal Server Error”, or sometimes “500 Internal Server Error” is a phrase you will see associated with a server being unable to identify where the problem is. You can check for the corrupted .htaccess access file by naming it something else, such as .htaccess_old. Then reload the page to see if that fixed the problem. If you are seeing the “Internal Server Error” message too frequently, you may be exhausting your PHP memory limit and may want to increase it.

3. Errors Establishing a Database Connection

If you have entered or modified your database credentials, such as your database host, database username, or database password, incorrectly, you will receive an error message telling you that you are unable to connect to the database. The first thing you need to do is check to make sure you are receiving the same message on both the front- and back-ends of the site. If they are different, your database has been corrupted. If they are the same, enter define(‘WP_ALLOW_REPAIR’, true); into your wp-config.php file. Then, you can see your settings by visiting http://www.yoursite.com/wp-admin/maint/repair.php. Once you are done making the repair, remove the message from your wp-config.php file. Make sure you have sufficient backups before you go about fixing problems with the database.

4. The White Screen of Death

If you are seeing a plain white screen with no error message, and thus have no idea what to fix, you may have exhausted your PHP memory limit or a problem with a configuration on the server. You may also be seeing the white screen on only certain sections of your site. If increasing your PHP memory limit doesn’t help, or if you already have a very high PHP memory limit, try disabling all of the plugins. Once the plugins are disabled, re-enable them one at a time until you find out what is causing the issue.

5. Returning 404 Error

If you are getting a 404 Error message on only one page of your site, while the rest of the site remains intact, you may need to reconfigure your permalinks settings or manually update your rewrite rules. To fix your permalinks settings, go to “settings”, then “permalinks”, and click “save changes”. This updates your permalinks settings. If this does not work, the solution is to manually update your .htaccess file. You can do this by logging into your server using FTP, and modifying the .htaccess file. The easiest way to fix it is to temporarily make the file writable, change the permissions to 666, and then update your permalinks settings once more. Once you are done, don’t forget to change the permissions back to 660.

6. Sidebar Below Content Error

If your sidebar is appearing below the content instead of next to it, there is an HTML or CSS error in your theme. It’s possible that you may have forgotten to close an html div tag or added an extra closing div, as this is the problem 9 times out of 10. If you are using a custom theme, the issue could also be a problem with width ratio or float property. “float: left;” and “float: right” need to be added to all of the appropriate elements of a custom theme, or else it will not work.

7. Missing Buttons and White Text

A common problem with buttons from WordPress visual editor is when the buttons start disappearing or showing up as white spaces instead of buttons. If you are experiencing this problem, or problems with the text appearing white so that you can’t see it, it could be that concatenated JavaScript is not working in your admin panel, TinyMCE files are missing or corrupt, or a plugin could be causing the problem. Sometimes, this can be fixed by simply clearing the browser cache or switching to a different browser. If this doesn’t work, replace /wp-includes/js/tinymce/ folder with a fresh copy. If neither solution worked, type “define(‘CONCATENATE_SCRIPTS’, false);” into your wp-config.php file right after the opening tag.

8. WordPress Memory Exhausted Error – Increase PHP Memory

Getting a message like “Fatal error: Allowed memory size of 33554432 bytes exhausted” occurs when you are exhausting the default memory size limit. To fix this, type “define(‘WP_MEMORY_LIMIT’, ’64M’);” into the main PHP tag of your wp-config.php file. This increases the memory limit to 64M.

9. Login Page Refreshing and Redirecting

If you are attempting to log in but are redirected back to the login page every time you type your login information in, the problem may be incorrect values for site url and home url fields. Because WordPress uses cookies for login authentication, the simplest solution is to clear your cache of cookies. But remember to still have cookies enabled. Then, restart your browser and try again. If that doesn’t work, deactivate all of your plugins and try to log in again. If it works this time, the problem was one of your plugins.

10. Image Upload Issues

If the images on your site are gone, and have broken image placeholders in their places, the problem is incorrect file and directory permissions in a WordPress installation, which could be caused by incorrect file permissions in your uploads directory. To fix this, use an FTP client, like Filezilla, which will allow you to change the permissions for your image directory.

2 Replies to “10 of the Most Common WordPress Errors and How to Fix Them”

Leave a Reply