Common WordPress Errors: A Detailed Guide on Fixing Them

Table of Contents

WordPress, a world-famous content management system (CMS), powers millions of websites. It offers simplicity in use and has a humongous library of themes and plugins, making it a popular choice for website owners. However, like any other software, WordPress can also encounter errors that can affect the website’s functionality. In this blog, we’ll discuss some common WordPress errors and how to troubleshoot them.

Common WordPress Errors and How to Fix Them

White Screen of Death

One of the most irritating errors that WordPress users encounter is the White Screen of Death (WSOD). It is a blank white screen that appears when you try to access your website. The causes of this WordPress error are varied and are listed below: 

  • Disable all plugins and reactivate them one by one to identify the problematic plugin. If this fails, try changing the theme to the default WordPress theme. 

WordPress errors

  • Increase the PHP memory limit to get rid of this WordPress error. You can do this by adding the following code to your wp-config.php file in the root directory of your website: define(‘WP_MEMORY_LIMIT’, ‘256M’);

config file

  • Enable WordPress debug mode to display the error message on the screen: Locate the config file of your website’s root directory as shown above. Just right click on the file, and edit it. 

wordpress errors

Replace define(‘WP_DEBUG’, false); to define(‘WP_DEBUG’, true); 

wordpress errors

WordPress Login Page Refreshing and Redirecting Issue

Another common issue faced by WordPress users is the login page refreshing or redirecting repeatedly. This error is often due to incorrect login credentials, cookies, or a plugin conflict.

To resolve this problem, you can try the following solutions:

  • Clear your browser cookies and cache and try logging in again.

browser cache                  500 internal server error browser cache

  • Deactivate all plugins and try logging in again in the same as mentioned above. If this works, reactivate the plugins one by one to identify the problematic plugin.
  • Check your WordPress address (URL) and site address (URL) settings in the WordPress dashboard. Make sure they are correct and not broken. 

WordPress errors

WordPress Keeps Logging Out Problem

If you have been using WordPress for a while, it is likely that you have experienced the frustrating problem of being logged out at least once. This issue, commonly known as the session timeout problem, can be particularly frustrating when you are in the middle of saving an important setting. One of the significant reasons for this problem is the site URL. 

To resolve this problem, you can follow the steps:

  • WordPress dashboard 

A simpler way to solve this problem is by accessing the site URL through the WordPress dashboard, as mentioned in the above point. Check if the URLs mentioned are correct. 

  • FTP Configuration

If you can’t access the dashboard, then modify the wp-config.php file by adding a code snippet. Firstly, connect to your website via FTP and find the wp-config.php file in your website’s root directory. Download this file to your local server and copy-paste it in a text editor such as Dreamweaver or Notepad. Then, include the following code into your wp-config file:

WordPress Keeps Logging Out Problem

Make sure to replace “example.com” with your domain name. Afterward, save the file and upload it back to your website’s root directory.

Fixing WordPress Image Upload Issues

If you are unable to upload images to your WordPress site, it could be due to file permissions, an outdated version of WordPress, or a plugin conflict.

To resolve this problem, you can follow the steps:

  • Check your file permissions and ensure that they are set correctly.

Fixing WordPress Image Upload Issues

Once you click on the file permission, a new dialogue box will appear for modifying the file permissions. If the permission of 744 did not work previously, alter it to 755. After making the necessary changes, click on the OK button.

  • Deactivate all plugins and try uploading an image again. If this works, reactivate the plugins one by one to identify the problematic plugin. This will help in eliminating this WordPress error.
  • Updating your WordPress site to the latest version can remove this WordPress error. If you are a Nestify user, these updates appear as soon as you enter the dashboard. It is just a 1-click process. 

Fixing WordPress Image Upload Issues

500 Internal Server Error

Internal server errors, also known as the “500 internal server error“, can occur on websites operated by anyone, not just WordPress users. Fortunately, the cause of these errors is often identified quickly. However, in the case of WordPress, issues with plugins and themes can often lead to server errors. Additionally, corrupted .htaccess files or insufficient PHP memory may also be the culprit behind these errors. It’s worth noting that internal server errors can impact the WordPress admin page while the rest of the site continues to function normally. Follow the ways to fix this error: 

  • ,htaccess file

When you encounter a WordPress error 500, it’s usually due to a corrupted .htaccess file. To address this issue, the first thing you should do is to check this file as soon as the error message appears. You can connect to your server through FTP access and go to the root directory of your WordPress installation to locate the .htaccess file. Rename this file temporarily and then refresh your website. If the issue is resolved, congratulations! Now you can create a new .htaccess file by going to Permalink Settings in your WordPress Admin Panel and saving the settings again.

  • PHP memory

If your website encounters a WordPress error 500, it could be due to PHP memory reaching its limit. To verify if this is the case, you need to inspect the error_log of your site and activate wp_debug mode to examine the error logs. You should locate the specific line of code in the wp-config.php file: 

wordpress errors

Replace this code with */ define( ‘WP_DEBUG’, true );

It’s advisable to disable themes and plugins one at a time because they can also be the source of an internal server error. Additionally, expanding the memory limit capacity may resolve the issue of WordPress error. 

  • Damaged core

It is uncommon, but on occasion, the WordPress core may become corrupted and result in an internal server error. In such a scenario, it is necessary to obtain a fresh set of kernel files to resolve the root of the problem. To do this, log in to your website using FTP access and generate new wp-admin and wp-include directories. Typically, alterations made to these directories will not impact your WordPress customizations unless you have edited files within them, which is typically not the case. Your theme, plugins, and other changes are located in the wp-content directory, which does not require renewal, as doing so would delete the content of your site. If none of the above mentioned ways work, you must obtain a new copy of WordPress from the official website and reinstall it entirely.

Database Connection Error

If you see an “Error establishing database connection” message when trying to access your WordPress site, it means that WordPress is unable to connect to your site’s database. This WordPress error can be due to incorrect database credentials, corrupted database tables, or a server issue. Fix it in the following ways: 

  • Connection settings

When attempting to connect to a database, a WordPress error may occur as a result of having incorrect connection settings in the wp-config.php file. In case you are transferring your website from a previous hosting provider, it will be necessary to modify this file. You should update the database’s name and password within the wp-config.php file to ensure the database functions correctly.

Database Connection Error

  • Incorrect config file

It appears that you may have neglected to update the wp-config.php file after modifying your database password. It’s important to regularly update your password for added security measures. Keep in mind that you’ll need to update both the password in your hosting control panel as well as in the wp-config.php file. To do this, access the wp-config.php file, which can be uploaded and edited using a text editor. Look for the following line: Define(‘DB_PASSWORD’, ‘enter the password here’); and replace the placeholder text with your new password. Save the updated file and download it via FTP. Finally, ensure that your site is functioning correctly by reloading the page in your browser.

  • Database host

If you have updated your wp.config.php to access your database from a new host, you may need to modify the DB_HOST value (i.e., the database host). Although uncommon, this error can occur in WordPress. Certain hosting providers utilize their own values for the database host parameter in wp-config. However, this is not always the case. Other hosts specify a URL for the MySQL database server, which should be used as the database host value. It is also possible to use the hosting IP address instead of a MySQL URL in some cases.

  • WordPress site transfer

Transferring your WordPress files to a new host is a common source of error that can cause your website to fail to display when you access the URL. If you haven’t transferred your database to your new provider’s server after terminating your contract with your former host, you’ll receive the error message “Error Establishing Database Connection” in WordPress. To ensure that you don’t lose any data or encounter the “Error Establishing Database Connection” error, make sure to update your wp-config.php file with the details of your new database before canceling your old hosting account. Before troubleshooting any issues, be sure to have a backup copy of your database by exporting your MySQL file.

Taskbar appears below the main content

If you encounter the common WordPress error where your taskbar appears below your main content, your sidebar will no longer be displayed to the left or right of your main text but underneath it. This not only looks aesthetically bad but can also impact the functionality of your website. However, this error does not render your theme unusable, and fixing it can often be done quickly.

One possible cause of this error is having too many open tags or closed div tags in your HTML. Div tags are used to define HTML elements in your website, and if they are not used correctly, it can affect the layout. If the error only appears on certain pages or sections, it’s likely that the div tags are causing the problem. To check for div tag errors, you can use an online HTML validator.

Another potential cause of the error could be an issue in your CSS style sheet. If you recently made changes to the file and specified different sizes for your main content and sidebar, your CSS may not be able to build the layout properly. Additionally, incorrect or excessive padding can also lead to a distorted display of your website.

Lastly, it may be necessary to disable the float property of your sidebar in CSS to prevent it from aligning to the left or right. Be sure to check the float definition to rule out this information as a source of the error.

Syntax Errors 

A small typo in the wrong position can cause your entire WordPress page to shut down and leads to this WordPress error. However, a “Syntax Error” message is not an unsolvable problem. Typically, a syntax error is caused by a critical error in the code’s syntax, such as a missing comma or parenthesis, which can interrupt the entire script. If you’ve recently installed a snippet or updated a plugin, that should be the first thing you check.

To fix this WordPress error, you need to modify the code that caused the error. You can either delete it completely or correct the syntax. As a beginner, it’s easy to get frustrated when a single mistake makes your entire site inaccessible. If you added the code to your WordPress dashboard using the editor area, you can no longer directly access your WordPress code. The only way to fix the syntax error is to directly exchange the faulty code via FTP.

To do this, log in to your FTP program and navigate to the directory containing the theme file that needs to be modified. The error code will indicate the file and line that need to be corrected.

Once you’ve either removed the newly added code or corrected the syntax, save the file and upload it to your server. Then, launch your website’s address without cache, and it should work properly again.

To Conclude,

WordPress errors can be frustrating, but they can be resolved by following the solutions mentioned above. It is important to keep your WordPress site updated and use plugins and themes from reputable sources to prevent errors. If you encounter a persistent error that you are unable to resolve, you can seek help from the WordPress community or hire a professional to assist you.

FAQs

What can I do if I keep getting logged out of WordPress?

In case of frequent WordPress logouts, you can attempt clearing your browser cache, disabling plugins, extending the session expiry time, or verifying your cookie settings.

Why does the WordPress taskbar sometimes appear below the main content?

This issue may arise due to a CSS conflict with your WordPress theme or plugin. 

What steps should I take if I face a persistent WordPress error that I am unable to fix?

If you come across a recurring WordPress error that you are unable to fix, you can seek help from the WordPress community or hire a professional to assist you. You could also try restoring a backup of your website to a previous functional state.

Fully Managed WordPress Hosting

Nestify’s AWS powered dedicated CPU servers keep your sites fast, secure, and always up to date.

Want faster WordPress?

WordPress Speed Optimization

Try our AWS powered WordPress hosting for free and see the difference for yourself.

No Credit Card Required.

Whitelabel Web Hosting Portal Demo

Launching WordPress on AWS takes just one minute with Nestify.

Launching WooCommerce on AWS takes just one minute with Nestify.