βοΈCommon WordPress Installation Errors
Here are the most common reasons and fixes:
β
1. Wrong database name, user, or password
Check your wp-config.php file inside /var/www/html/wordpress/:
define( 'DB_NAME', 'wp_lab' );
define( 'DB_USER', 'wp_user' );
define( 'DB_PASSWORD', 'password' );
define( 'DB_HOST', 'localhost' );Make sure these match exactly what you created in MariaDB.
If you used a different name/password, fix it here.
β
2. MariaDB is not running
Check the status:
sudo systemctl status mariadbIf stopped, start it:
sudo systemctl start mariadbβ
3. User doesnβt have permissions
Log in to MariaDB:
Then re-grant privileges:
β
4. Wrong DB host
In most local labs, DB_HOST should be:
But in Docker setups, it might be mariadb or the container name.
Check with:
β
5. Socket issues
Sometimes WordPress expects TCP (127.0.0.1) instead of the MariaDB socket.
Try editing wp-config.php:
β
6. Test the database connection manually
From terminal:
If this works, then the problem is only in wp-config.php.
If it fails, the user or DB is misconfigured.
Last updated