Linux php Wordpress
jovialcore  

[Solved] Unable to write to wp-config.php file on linux ubuntu

Unable to write to wp-config.php” is usually a problem you get when installing wordpress on a linux environment. In my case, I wanted to install wordpress locally on linux with the the xampp apache server.

The error is related to the default linux unauthorised read and write or file permissions for that folder where you have your wordpress.

This is a quick solution to fix this issue.

On your terminal run the following:
cd into your htdocs where you have your xampp installtion

cd /opt/lampp

Next, change the user username and grouwp ownership from the default root:root to your own username and group

sudo chown -R yourusername:yourusername /opt/lampp/htdocs

Note: remember to replace “yourusername” in the command above with your own username and group. Most of the time, the username and usergroup is same words. e.g jovialcore:jovialcore

Next, change the htdocs folder and all files persmissons to read and write by running the following command :

chmod -R 777 htdocs

That’s all.

Leave A Comment