When installing the system, we may have troubles and fall in any of the WordPress most common installation errors, I have to honest, it is unlikely to get errors related to the WordPress system itself, most of them are server file and folder permission problems, mistyped URL, PHP syntax error when editing the wp-config.php or a MySQL connection or permissions error. So Let’s get started.
Access Forbidden! – Error 403
This is common error found when installing WordPress on a server. It happens when the server user does not have the right access to the WordPress root folder, so you need to grant those access. If you are working on your local machine with a Windows O.P., you just go to the WordPress folder and give read, write and execute access to the WordPress folder for your current user. If it is a Linux machine instead, you can run the «chmod» command to grant 755 permissions to folders and subfolders, and 644 to files;
find wordpress/ -type d -exec chmod 755 {} \;
find wordpress/ -type d -exec chmod 664 {} \;
Remember, «wordpress/» is your WordPress main folder, where the wp-content, wp-admin and wp-include folders are.
Error establishing a database connection.
MySQL server is not running.
If you see a big bold text telling you that there is an error when trying to create a database connection, it is likely because your MySQL database server is down or not working properly. In this case, it is advisable to check if your MySQL server is «Running.»
If you installed a local instance of XAMPP, you can open your «XAMPP Control Panel» (usually at «C:\xampp\xampp-control.exe», on Windows) and verify if the MySQL module is Running (Highlighted with a green background) if not, you can make click on «Start» to initiate your MySQL server.
If you are working on an online Web Host, you have to contact the Host administrator and let him/her know that your Web Server can not establish a connection with your MySQL server. And then follow up the situation.
Wrong Credentials on database connection details
When you are installing WordPress, and you let WordPress create the wp-config.php file for you (we will talk about this file in another article), WordPress shows a screen with this text «Below you should enter your database connection details. If you’re not sure about these, contact your host.» In this screen you are required to type your Database Name, MySQL Username, MySQL Password, Database Host; this is the URL or IP representation of your database, it is usually «localhost,» and your Table Prefix. If you type wrong any of the fields except the Table Prefix, WordPress will display an error connection in the next screen, and you will have to solve it. So, in this case, you can:
First, verify if you forgot to create a MySQL database for your WordPress on http://localhost/phpmyadmin/; for local machine users, or contact your Web host administrator to check this for you.
Second, verify if your MySQL server is already running and the credentials are correct. If you are on a local machine, you can run http://localhost/phpmyadmin/, and log-in to your phpMyAdmin system using your credentials, if they do not work, you will have to follow your local web server provider (XAMPP, MAMPP, WAMPP, etc.) instruction to recover your user and password credentials for your MySQL server. Again, if you are running a Web server, you will have to contact your web host provider for instruction how to recover your MySQL access.
Headers Already Sent
There are some cases when web developers do not want to follow the WordPress wizard to create the wp-config.php file with the initial configuration, and they edit the file directly. It ok to do it, and actually, it is recommended if you are an advanced or intermediate WordPress programmer because you can follow a couple of instruction to improve your WordPress security. But in the process, you could make a mistake, and you can fall in a PHP Syntax error, leading to a Headers Already Sent Error. So, just go to the file referenced in your error text, and correct your Syntax Error.
In this case, I recommend you to use a PHP Linter extension for your Code Editor to avoid many syntax mistakes and follow PHP Programming Standards.
Page not found – Error 404
About this error, I think it is self-explanatory, but, I decided to talk about it just in case. If this happens, you will have to check the URL in the «Browser address bar.» This URL has to reference the route of your WordPress root folder, in many cases, and because WordPress comes in a zip or tar.zg file, you have to type /wordpress/ at the end, because when you decompress the file, it will create a «wordpress» folder with your full WordPress System. So, double check your WordPress root folder and type the correct URL on your browser.
A complete WordPress most common errors list can be found in the WordPress Codex; In this URL you can find errors when installing plugins, upgrading WordPress, etc. So, it is worth to take a look when you get more experience in WordPress development.