There is no doubt that WordPress is the easiest to use website building platform. Anyone can make their own website using WordPress without any hassle. But when it comes to WordPress errors, they can very complicated and overly technical. However, the good news is that with its vast user base and supportive community and someone has probably already been in the same situation and provided a solution. Also, understanding some of the most common WordPress issues can help you prepare and troubleshoot WordPress problems when they pop up. So, today I’m introducing you to a new series, some common WordPress errors and their solution. This series will help you to fix the errors if you face them in the future.
Error Establishing a Database Connection:
This error indicates, WordPress cannot connect to the site’s database. In case you’re unfamiliar with Database, your site’s database is where all its content is stored. This includes your posts, pages, and user information. As such, if you can’t access the database, your site won’t be able to function at all. Error establishing a database connection error may occur when your WordPress database path is incorrect or your database server is down. If the database is correct, maybe your host server is not working. This can also happen when you’ve modified or entered your database details incorrectly, such as your database name, username and password.
Solutions:
a. Use the WordPress repair tool :
In your WordPress admin dashboard you can see your database connection status. There is a repair tool you can use that to fix the error.
b. Check wp-config.php :
As wp-config.php stores the data that was entered during installation check wp-config.php using File Manager from your Cpanel or using FTP. Check if you are correctly using the database name, username, password and server.
c. Contact your hosting provider :
If you can’t access your admin dashboard that means the problem with the web hosting provider. Contact them, they should be able to tell you if there is an issue with the server or not. Due to repair or maintenance work, the database connection doesn’t work for some time. Also, the database may have shut down because of reaching the maximum size assigned to it.
Internal Server Error:
This is one of the most common and confusing errors WordPress site owners face. This error message typically shows up when something is wrong but doesn’t show where the problem is. And because the message doesn’t tell you where the issue exists, it’s mostly down to you to find it.
Solutions:
a. Check .htaccess:
Sometimes your .htaccess file can be corrupted and cause an internal server error. To solve this issue access your server via FTP and find the file in your root directory. The .htaccess file is a hidden file so you need to click ‘Show hidden files’. After you have found it, right-click and rename the file and try reloading your site.
After that, log into your site and save your permalink structure. You don’t need to make any changes there just go to ‘Settings > Permalinks’ and click ‘Save’. This will generate a fresh .htaccess file and hopefully resolve the issue.
b. Increase the PHP memory limit:
This error can arise because of insufficient memory. To increase your memory limit open the wp-config.php file via FTP and add the following line:
define('WP_MEMORY_LIMIT', '64M').
This will increase the memory limit to 64MB. You can also set it to 128MB or 256MB if necessary. Not every host allows increasing memory. If your host doesn’t allow doing so then you need to contact them. If the error occurred because of insufficient memory then it will solve after increasing the memory.
c. Deactivate all plugins:
Internal server error may occur because of conflict between plugins. Deactivate all the active plugins and reactive them one by one. If the error occurs because of plugins then you will find out which plugin is the culprit.
d. Change theme:
If none of the above solutions works then try to deactivate the current theme and activate any theme that comes by default with WordPress installation. If this method doesn’t solve the issue try the next one.
e. Contact your host provider:
The last thing you can do to fix the issue is to contact with you hosting provider so that they can fix it.
White Screen of Death:
The most disturbing thing about this problem is, you don’t have an error message pointing you to the issue. It just simply replaces your entire site with a blank, white nothing.
Solutions:
a. Increase the memory limit:
Follow the same step mentioned above to increase the memory size.
b. Disable all plugin:
Disable all the plugin as mentioned above. You can also connect your site via FTP and rename the wp-content/plugins folder to something else.
c. Use a defult theme:
We also talked about this step on Internal Server Error. This should remove the white screen error.
d. Enable debuging mode:
If the error still remains, insert this code into your wp-config.php file:
define( ‘WP_DEBUG’, true);.
Using this feature will let you know the true cause of the error.
404 Not Found:
When a 404 error message pops up, it simply means the server can’t find the file the user requests. This error can occur unexpectedly, or in some cases, after you make changes to your WordPress site.
Solutions:
a. Reset your permalink:
The most common cause of the WordPress 404 error is a problem with the way WordPress generates your permalinks. To solve this problem you need to reset your permalink 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 exist, 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.
c. Disable all plugin and themes:
As we mentioned earlier, sometimes your plugins and themes can affect your WordPress URL structure. So, disable them and reactivate them one by one to find the culprit.
403 Forbidden Error:
This HTTP status code is generated when you are trying to access a resource that is forbidden for any reason. Often, this happens because of improper configuration that can result in denying access to the requested resource.
Solutions:
a. Check .htaccess file:
Sometimes your .htaccess file can be corrupted and cause an internal server error. To solve this issue access your server via FTP and find the file in your root directory. The .htaccess file is a hidden file so you need to click ‘Show hidden files’. After you have found it, right-click and rename the file and try reloading your site. After that, log into your site and save your permalink structure. You don’t need to make any changes there just go to ‘Settings > Permalinks’ and click ‘Save’. This will generate a fresh .htaccess file and hopefully resolve the issue.
b. Check file permission:
Many files in WordPress require access permissions. However, when there are incorrect permissions, the server will demonstrate a 403 forbidden error. It shows that you do not have the particular file which you have requested. To check the permission connect your WordPress website using an FTP and navigate to the root folder. Now click on the right click option and find out the file permissions option.
You can see the file permission dialog box and make sure the numeric value in the Permission box of your WordPress website is set to 744 or 755 and check the box next to ‘Recurse into subdirectories’ and then check the option that says ‘apply to directories only.‘
Done with this process, you need to repeat the same process for all the files. Now, you will be setting the file permission to 644 or 640, and don’t forget to select Recurse into subdirectories > apply to files only.
Now check your website again if the 403 forbidden WordPress error is resolved or not. If it still persists then you need to perform the next step.
c. Disable all plugins:
Disable all the plugin as mentioned above.
Parse Error/Syntax Error:
This error occurs when you add snippets of code into your WordPress files and the code has the wrong syntax, or some characters get missed. The error looks like:
Solutions:
As the error message shows which line of code has the error, it is easier for you to fix the error. All you need to do is connect your server via FTP, browse to the functions.php file, right-click to edit, and fix the line the error message is pointing out. Save the file and select ‘Yes’ when your FTP client asks if you want to replace the existing file on the server. You should now be able to check your site and see that it’s back to normal.
Connection Timed Out:
This error is very common in shared hosting environment. It means that the server is struggling to load the site, and has essentially given up.
Solutions:
a. Increase PHP memory size:
Follow any of the same step mentioned above to increase the memory size.
b. Deactivate all plugins:
Plugin problems can also cause timeouts. Refer to the description above to find out how to fix them.
c. Switch to a default theme:
Timed-out connections are also sometimes due to the theme issue. In this case, follow the instructions further up on the page to use one of the default WordPress themes.
That’s for today. We will talk about more errors in our upcoming articles of Common Errors Series. Please share if you have any other way to fix the above-mentioned issue. Also, don’t forget to check our other articles to get more Tips & Tricks.
Sidratul Sohrat
I am Sidratul Sohrat, a dedicated content writer with a fervent passion for creating engaging and informative content related to technology, business, and marketing.
How to Stop Contact Form Spam on WordPress
Beginners Guide to Add a Navigation Menu in WordPress
There is no doubt that WordPress is the easiest to use website building platform. Anyone can make their own website using WordPress without any hassle. But when it comes to WordPress errors, they can very complicated and overly technical. However, the good news is that with its vast user base and supportive community and someone has probably already been in the same situation and provided a solution. Also, understanding some of the most common WordPress issues can help you prepare and troubleshoot WordPress problems when they pop up. So, today I’m introducing you to a new series, some common WordPress errors and their solution. This series will help you to fix the errors if you face them in the future.
Error Establishing a Database Connection:
This error indicates, WordPress cannot connect to the site’s database. In case you’re unfamiliar with Database, your site’s database is where all its content is stored. This includes your posts, pages, and user information. As such, if you can’t access the database, your site won’t be able to function at all. Error establishing a database connection error may occur when your WordPress database path is incorrect or your database server is down. If the database is correct, maybe your host server is not working. This can also happen when you’ve modified or entered your database details incorrectly, such as your database name, username and password.
Solutions:
a. Use the WordPress repair tool :
In your WordPress admin dashboard you can see your database connection status. There is a repair tool you can use that to fix the error.
b. Check wp-config.php :
As wp-config.php stores the data that was entered during installation check wp-config.php using File Manager from your Cpanel or using FTP. Check if you are correctly using the database name, username, password and server.
c. Contact your hosting provider :
If you can’t access your admin dashboard that means the problem with the web hosting provider. Contact them, they should be able to tell you if there is an issue with the server or not. Due to repair or maintenance work, the database connection doesn’t work for some time. Also, the database may have shut down because of reaching the maximum size assigned to it.
Internal Server Error:
This is one of the most common and confusing errors WordPress site owners face. This error message typically shows up when something is wrong but doesn’t show where the problem is. And because the message doesn’t tell you where the issue exists, it’s mostly down to you to find it.
Solutions:
a. Check .htaccess:
Sometimes your .htaccess file can be corrupted and cause an internal server error. To solve this issue access your server via FTP and find the file in your root directory. The .htaccess file is a hidden file so you need to click ‘Show hidden files’. After you have found it, right-click and rename the file and try reloading your site.
After that, log into your site and save your permalink structure. You don’t need to make any changes there just go to ‘Settings > Permalinks’ and click ‘Save’. This will generate a fresh .htaccess file and hopefully resolve the issue.
b. Increase the PHP memory limit:
This error can arise because of insufficient memory. To increase your memory limit open the wp-config.php file via FTP and add the following line:
This will increase the memory limit to 64MB. You can also set it to 128MB or 256MB if necessary. Not every host allows increasing memory. If your host doesn’t allow doing so then you need to contact them. If the error occurred because of insufficient memory then it will solve after increasing the memory.
c. Deactivate all plugins:
Internal server error may occur because of conflict between plugins. Deactivate all the active plugins and reactive them one by one. If the error occurs because of plugins then you will find out which plugin is the culprit.
d. Change theme:
If none of the above solutions works then try to deactivate the current theme and activate any theme that comes by default with WordPress installation. If this method doesn’t solve the issue try the next one.
e. Contact your host provider:
The last thing you can do to fix the issue is to contact with you hosting provider so that they can fix it.
White Screen of Death:
The most disturbing thing about this problem is, you don’t have an error message pointing you to the issue. It just simply replaces your entire site with a blank, white nothing.
Solutions:
a. Increase the memory limit:
Follow the same step mentioned above to increase the memory size.
b. Disable all plugin:
Disable all the plugin as mentioned above. You can also connect your site via FTP and rename the wp-content/plugins folder to something else.
c. Use a defult theme:
We also talked about this step on Internal Server Error. This should remove the white screen error.
d. Enable debuging mode:
If the error still remains, insert this code into your wp-config.php file:
Using this feature will let you know the true cause of the error.
404 Not Found:
When a 404 error message pops up, it simply means the server can’t find the file the user requests. This error can occur unexpectedly, or in some cases, after you make changes to your WordPress site.
Solutions:
a. Reset your permalink:
The most common cause of the WordPress 404 error is a problem with the way WordPress generates your permalinks. To solve this problem you need to reset your permalink 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 exist, create a blank text file and save it as .htaccess. Add the following code to the .htaccess file:
Save and upload the .htaccess to the same location.
c. Disable all plugin and themes:
As we mentioned earlier, sometimes your plugins and themes can affect your WordPress URL structure. So, disable them and reactivate them one by one to find the culprit.
403 Forbidden Error:
This HTTP status code is generated when you are trying to access a resource that is forbidden for any reason. Often, this happens because of improper configuration that can result in denying access to the requested resource.
Solutions:
a. Check .htaccess file:
Sometimes your .htaccess file can be corrupted and cause an internal server error. To solve this issue access your server via FTP and find the file in your root directory. The .htaccess file is a hidden file so you need to click ‘Show hidden files’. After you have found it, right-click and rename the file and try reloading your site. After that, log into your site and save your permalink structure. You don’t need to make any changes there just go to ‘Settings > Permalinks’ and click ‘Save’. This will generate a fresh .htaccess file and hopefully resolve the issue.
b. Check file permission:
Many files in WordPress require access permissions. However, when there are incorrect permissions, the server will demonstrate a 403 forbidden error. It shows that you do not have the particular file which you have requested. To check the permission connect your WordPress website using an FTP and navigate to the root folder. Now click on the right click option and find out the file permissions option.
You can see the file permission dialog box and make sure the numeric value in the Permission box of your WordPress website is set to 744 or 755 and check the box next to ‘Recurse into subdirectories’ and then check the option that says ‘apply to directories only.‘
Done with this process, you need to repeat the same process for all the files. Now, you will be setting the file permission to 644 or 640, and don’t forget to select Recurse into subdirectories > apply to files only.
Now check your website again if the 403 forbidden WordPress error is resolved or not. If it still persists then you need to perform the next step.
c. Disable all plugins:
Disable all the plugin as mentioned above.
Parse Error/Syntax Error:
This error occurs when you add snippets of code into your WordPress files and the code has the wrong syntax, or some characters get missed. The error looks like:
Solutions:
As the error message shows which line of code has the error, it is easier for you to fix the error. All you need to do is connect your server via FTP, browse to the functions.php file, right-click to edit, and fix the line the error message is pointing out. Save the file and select ‘Yes’ when your FTP client asks if you want to replace the existing file on the server. You should now be able to check your site and see that it’s back to normal.
Connection Timed Out:
This error is very common in shared hosting environment. It means that the server is struggling to load the site, and has essentially given up.
Solutions:
a. Increase PHP memory size:
Follow any of the same step mentioned above to increase the memory size.
b. Deactivate all plugins:
Plugin problems can also cause timeouts. Refer to the description above to find out how to fix them.
c. Switch to a default theme:
Timed-out connections are also sometimes due to the theme issue. In this case, follow the instructions further up on the page to use one of the default WordPress themes.
That’s for today. We will talk about more errors in our upcoming articles of Common Errors Series. Please share if you have any other way to fix the above-mentioned issue. Also, don’t forget to check our other articles to get more Tips & Tricks.
Sidratul Sohrat
I am Sidratul Sohrat, a dedicated content writer with a fervent passion for creating engaging and informative content related to technology, business, and marketing.