These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for WordPress wp-config.php file is blank, and not connected to database. on the new forum.
Ever since WordPress 5.1 it has not installed correctly, no idea why.
Every time I have to manually configure wp-config.php because of errors with establishing a database connection.
Ubuntu 16.04 clean install tested on 2 different servers.
Both times, empty wp-config.php
I recommend installing older version to get it to work possibly.
I have been running debian 9 for quite some time now...i have not experienced this with debian.
Having said that, i have had an ubuntu 16 server in the past and had no problems like this with it...i use wordpress exclusively for websitee on my server. I am surprised that the wordpress install is not throwing an error?
Hqve you enabled wp-debug to try and figure out where the issue is? (Surely it has to be a permissions/ownership error of some kind causing this?) Its almost as if the user wordpress is running as cannot write to the wp.config file.
After you upload wordpress files, who does filemanager say the owner of those files and folders is and what permissions have been assigned?
If you are running virtualmin wordpress script, who are you logged in as when executing the wordpress script?
Finally, is tuebwordpress user being given all privaleges on database? Does the virtual server have sufficient privaleges to create a new database and edit it?
If not the above, then its above my level of "lightbulb moment" causes.
https://ajecreative.com.au
What versions of MySQL and PHP are you running ?
I'm having the same issue as SidedTech.
I've setup many Virtualmin servers in the past, but for the past week or so, every Wordpress scripted install fails due to no database being created. I've tried both CentOS 7 & Ubuntu 16.04.5. Have tried 10+ times.
Are you all finishing the install via the webpage after you have run the wordpress install script from within virtualmin? The DB and config is blank until admin name, password, email is input in the wordpress setup page which is linked to at the end of the install script.
I only ask because I just ran the install script and it installed no issues. Ubuntu 16.04 default everything. Latest virtualmin.
@scotwnw, Thanks for taking the time to test it!
Yep, that was the issue. Can't believe I overlooked that step... have done it so many times before.
Thanks again for helping me out.
Oops, I take that back. Your solution works for Ubuntu, but still having the issue with CentOS.
After installing WP via script, then trying to access the installer as shown in the link at end of script (.../wp-admin/install.php), then still getting this error:
"Error establishing a database connection"
The wp-config.php has no server-specific details. Just placeholder data.
I am having the same issue you've described @ronnoreid. I've now created fresh virtualmin installations on multiple times and they're all demonstrating the issue. I'm using Ubuntu 16.04.
FYI: Just editing the wp-config file with the server administrator username, password and the servers database (SEVERNAME_wordpess) seems to work. Still, I'm concerned that other things might not have completed properly.
the same happens to me in a fresh droplet from digital ocean with debian 9 but incredibly it works on another machine with debian 9 where the virtualmin has been used for a couple of years
I've found a solution: Navigate to /etc/webmin/virtual-server/latest-scripts/ and delete the wordpress.pl file Then, upload this one. The problem is that the file you deleted is the 5.0.1 version, and the linked one is 5.1.1. Tell me if it works
@borkeon solution worked for me, but the script was in /usr/libexec/webmin/virtual-server/sripts on CentOS 7 x64.
i forgot to mention that i am on Debian 9
I dont have the /latest-scripts/ directory. centos7 64bit virtualmin
http://prntscr.com/nd5wci
https://www.virtualmin.com/comment/810322#comment-810322
Just wanted to revive this a bit, I have STILL not figured out what could be tied to this problem. Old virtualmin installs are all working properly, but every Instance I create, I setup VMin completely, update fully, run all checks (auto updates, etc) and then register the domain, fix the email settings, get everything PERFECT, and then when I attempt to install WordPress, the database is created but WP-CONFIG is empty every time I automate with WordPress install.
I have to manually enter all info in WP-CONFIG every single time i do this, 32 and 64 bit CentOS and Ubuntu.
Once in a while I get lucky, and it works on a new instance, and I have no idea why, I don't change my routine.
Also sometimes I get WordPress 5.0.3 and sometimes not...
Did you read the full post?
Yes, and I have not found a solution to my issue other than manually creating everything.
On Ubuntu 16.04.6 the location of the script is- /usr/share/webmin/virtual-server/scripts ...after I uploaded the replacememnt it worked!
Where do I put what script?
I have no latest-scripts folder, and this is a weird bug. Should I install older version?
EDIT: I made the folder myself just now and it worked.