WordPress wp-config.php file is blank, and not connected to database.

21 posts / 0 new
Last post
#1 Sun, 03/03/2019 - 19:46
SidedTech

WordPress wp-config.php file is blank, and not connected to database.

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.

Mon, 03/04/2019 - 04:59
adamjedgar

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.

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 03/12/2019 - 22:27
applejack

What versions of MySQL and PHP are you running ?

Mon, 03/18/2019 - 18:21
ronnoreid

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.

  • Start with fresh droplet at DigitalOcean.
  • As soon as booted, download Vm installer & execute.
  • When :10000 comes up, update all packages (i've also tried w/o updating packages).
  • Add first virtual server within Vm (http, https, mysql, bind).
  • Use Wordpress install script (reports "WordPress 5.0.3" in GUI, but I think it installs latest instead
  • Install at top level (have tried using both the suggested ..._wordpress option, plus the main db for the vm.
  • Install logs look fine, no errors.
  • BUT the databases have no tables.
  • The wp-config.php exists, but it is the default file with no host, user, pass, etc details. Just contains "database_name_here", etc.
Tue, 03/19/2019 - 12:57
scotwnw

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.

Tue, 03/19/2019 - 13:17 (Reply to #5)
ronnoreid

@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.

Tue, 03/19/2019 - 16:57
ronnoreid

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.

Tue, 03/19/2019 - 19:23
jcconnell

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.

Tue, 03/19/2019 - 19:31
jcconnell

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.

Fri, 03/22/2019 - 17:38
borekon
borekon's picture

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

Fri, 03/22/2019 - 17:50
borekon
borekon's picture

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

Sun, 03/24/2019 - 10:56
jrhillma

@borkeon solution worked for me, but the script was in /usr/libexec/webmin/virtual-server/sripts on CentOS 7 x64.

Sat, 04/20/2019 - 05:00 (Reply to #12)
borekon
borekon's picture

i forgot to mention that i am on Debian 9

Wed, 04/17/2019 - 06:40
keremsah2

I dont have the /latest-scripts/ directory. centos7 64bit virtualmin

http://prntscr.com/nd5wci

Fri, 05/10/2019 - 02:21
SidedTech

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...

Fri, 05/10/2019 - 02:51 (Reply to #16)
borekon
borekon's picture

Did you read the full post?

Thu, 05/16/2019 - 20:10 (Reply to #17)
SidedTech

Yes, and I have not found a solution to my issue other than manually creating everything.

Sun, 05/12/2019 - 15:38
jugganautz

On Ubuntu 16.04.6 the location of the script is- /usr/share/webmin/virtual-server/scripts ...after I uploaded the replacememnt it worked!

Thu, 05/16/2019 - 20:09 (Reply to #19)
SidedTech

Where do I put what script?

Thu, 05/16/2019 - 20:13
SidedTech

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.

Topic locked