Jeremy Dixon
Jeremy Dixon

Reputation: 101

Wordpress 'Failed to write wp-config' I've done all the Chowns

I am on a mission to install wp-deploy on my local installation of linux mint. I had a wordpress working in xampp via the bitnami plugin but wp-deploy needed to go to htdocs. I began getting permission errors like crazy. I am in day 4 of complete madness which last night resulted in me somehow accidentally corrupting my system files (maybe I chowned myself out of them but i dont think I touched anything besides the lampp folders) and having to reinstall mint so all further actions are taking place on a blank slate.

What I tried before the wipe:

NEW INSTALL ATTEMPTS

To reduce the number of variables I decided I would install regular old wordpress as I do not think the issue is related to wp-deploy.

This is what I've done today:

-Installed Xampp and dragged wordpress into htdocs/myprojectname/ After navigating to localhost/myprojectname/wordpress/wp-admin I was presented with the setup form. Got error ‘failed to write wp-config’

-Chown -R www-data:myuser ./lampp/ Caused mySql to get permission denied error in the xampp control panel

-Gut Xampp, try again Again, failed to write wp-config so this time I..

-Chowned only the wordpress folder using www-data

-still fails so I restart xampp

-Chowned only the wordpress folder using www-data:myuser

-still I get failed to write wp-config

-Chowned the directory containing the site just inside htdocs as my user

-same error

All of my google-fu takes me to posts that resolve when someone chowns the directory. Either I am experiencing a different error or I am doing something wrong. I am desperate. Help me obi-wan kenobi. You are my only hope.

-------UPDATE-------

Some other posts recommend building wp-config manually. The reason I haven't been doing this is because the underlying issue I want to solve is that wordpress has not been able to write to it's own folder and therefore cannot install plugins or do anything besides sit there. I was making the assumption that the wp-config error indicated the same permissions fight I had been in since before the wipe. I decided to manually build wp-config and it was as I thought, wordpress cannot install plugins.

-------UPDATE-------

I have chmod 777ed the directory and still no go.

Upvotes: 0

Views: 101

Answers (2)

Balaji Sivasakthi
Balaji Sivasakthi

Reputation: 147

Change ownership and group of your project folder

This will help you to solve the write problem in wp_config.php

 1.sudo chown daemon /opt/lampp/htdocs/[project_name]
 2.sudo chgrp daemon /opt/lampp/htdocs/[project_name]

Upvotes: 0

Best to Used LAMP stack instead of XAMMP

Upvotes: 1

Related Questions