Part I: Common Errors During WordPress Installation and How to Fix Them

On the bright side, many of these errors are easily solvable! So to save you from any unnecessary frustration, in this article, I will cover the most Common Errors During WordPress Installation and share with you the solutions to fix those problems.

Now, here’s the thing; I sat down and started writing out each of these errors and solutions and realized it was definitely too much to digest in one sitting. So to save us from WP indigestion, what I’ve decided to do is break up this content into two parts that will make up two separate blog posts:

PART I: Common Errors During WordPress Installation and How to Fix Them

PART II: Common Errors Using WordPress and How to Fix Them

Ready for PART I? Let’s do this.

Common Errors During WordPress Installation and Their Fixes

Before we start, I’d like to bring your attention the following comment:

Before trying to fix any WordPress error, make sure that you have created a full WordPress backup (site files and database). You can follow this tutorial to create a WordPress backup. In case you are unable to create the backup yourself, please contact your hosting company to get help from them.

Okay, now that we’ve taken care of the housekeeping, let’s get down to it.

Error establishing a database connection in WordPress

“Error establishing a database connection” is a common problem. What this means is that your website is unable to connect to the database. This error is typically caused by a misconfiguration of database details in your wp-config.php file. To fix this, locate the wp-config.php file in the root of your WordPress installation and ensure that the following information is correct:

  • Database name
  • Database username
  • Database password
  • Database host

 

 

You can also read about this error in WordPress Codex.

Headers Already Sent Error Message in WordPress

You may receive an error message on your site with the following text right after upgrading your WordPress or during a new installation:”Warning: Cannot modify header information – headers already sent by (output started at /path/blog/wp-config.php:34)”.

This error usually occurs when there are unrequired spaces in a given file; in this example it’s the wp-config.php. To fix this issue, edit and remove the undesired white space from that file. To do this you’ll need access via FTP and to download the file mentioned in the error message. Open it with a text editor you like and remove all spaces before <?php. When the changes are saved, you can upload the edited file back via FTP.

This error could involve other files too. So it’s pretty important to read the error message carefully as it states the specific filename (and path) where the error occurred.

 

 

You can find a more detailed description of WordPress FAQ here.

 

500: Internal Server Error in WordPress

This error is the most confusing WordPress error that a beginner may come across.

This issue isn’t a WordPress-specific error and is generally caused by plugins, theme features or if PHP memory limits have been exceeded and corrupted .htaccess file.

 

 

Yes, there are many possible sources for this error, but no need to panic! Most likely it’s not you who even caused this problem, but your hosting provider.

So, how to resolve this problem? Let’s discuss the possible sources first:

  • First, it may be that .htaccess file is corrupted or configured incorrectly. To check it, you need to connect via FTP to the root of your website, find the .htaccess file and rename it to something like .htaccess_old. Now refresh your website. If the website works properly, it means the .htaccess file was the reason. If that’s the case, just log in to your WordPress dashboard, go to Settings > Permalinks and click the “Save” button. WordPress will generate a new .htaccess file.
  • It may be the case that some specific files or folders don’t have correct permissions. The quickest way to remedy this is by clicking on the file/folder via FTP and editing their permissions directly with the following values: 755 for folders, and 644 for files (with very few exceptions). You can contact your hosting service provider to set correct permissions.
  • Sometimes a new plugin that you recently installed or an updated version of an existing plugin is the source of the problem. The only way to find out which plugin broke the site is to disable them and reactivate them one by one. Luckily there is a step that saves you a lot of time. If you log into your server via FTP and rename the whole “plugins” directory to “plugins_old”, or whatever you like, this will deactivate all your plugins in one step only, while keeping their settings intact. Now if you visit your site and see it running, then the problem causing the Internal Server Error is located in one of your plugin folders. Unfortunately, that means that you now have to go through your plugins one by one to find the cause.
  • Another reason could be corrupted files in which case you should change them with new ones. The process you need to follow is to download the latest version of WordPress and upload the new “wp-admin” and “wp-includes” folders via FTP.

Important: Don’t upload the new “wp-content” folder because it will replace your current one and you’ll lose all theme and plugins files.

If none of the above solutions worked, it’s time to contact your hosting provider support and tell them about your internal server error. They will look at your server logs, and you’ll have a better idea of what’s causing that 500 error.

403: Forbidden Access

You may have received this error message when viewing a page of your site “You are not authorized to view this page. (403 error)”. It means your server permissions don’t allow access to a specific page. Another common cause for the 403 Forbidden error in WordPress is due to poorly configured security plugins. Many WordPress security plugins can block an IP address if they believe them to be malicious.

 

 

So a few solutions include first checking if you’re using plugins to see if they’re being blocked. Also, don’t forget to check the file permissions. You can ask your hosting provider support to check your website for correct file permissions. This article in WordPress Codex will give you more details regarding changing permissions.

WordPress Admin Login 404 Issue

When trying to access the WordPress admin login page, you may receive a 404 error page instead. One of the solutions will be to update the URL of your website in database.

The best way is to ask your hosting provider support to do this for you. They should complete this task easily.

Another solution is to update folder permissions. From the content above I assume that you’ve already read this article and learned how to change permissions. If you experience any difficulties, then ask your hosting provider support to help you.

Connection Timed Out

You might be seeing the connection timed out error when your website overruns your server’s memory limit. To fix that, you can do the following:

  • Check if any plugin is causing the issue, you can refer to this article for more information.
  • Disable your current theme and activate the WordPress default theme to rule out any theme-related causes.
  • Increase your PHP memory limits. If you can’t, ask your hosting provider to increase it for you.
  • Increase the maximum execution time in your php.ini file, either by asking your hosting provider to take care of it or by following the WordPress Codex tips.

 

 

What will PART II Cover?

First, I hope these solutions were helpful for you and please leave any comments or questions below in the comment section!

In PART II of this post will talk more about WordPress-specific problems that occur once you’re installed and running. Keep an eye out and we’ll go one by one through all of the most common problems I’ve encountered with hundreds of WordPress users.

 

Recommended Posts