Cannot get the site to install / DB_NAME not found

I’ve been trying all day to get this working and achieved nothing.

The live site is hosted with Kinsta.

It failed to sync the 8gb site multiple times saying that something went wrong, and then the logs said that the rsync had failed to get files and the details were above, but there were no details. And it didn’t fail until right at the end of the massive file sync.

Then when i created the zip download of the site and tried to install that, it complains bad wp-config 081 and the logs say can’t find DB_NAME.

I tried extracting it and moving that to the top of the file (after the php comments) but still didn’t fix anything.

I’ve tried making a zip without the media folder to see if it was running out of memory or something.

I checked docker and that was out of date so I’ve updated it.

I’ve gone through the full “uninstall devkinsta / docker” guides on their sites, removing all hidden folders and such.

I’ve updated to the latest mac sonoma release, I was on the previous os version before this.

Still, even after rebooting, and fully installing everything again from fresh I am just getting nowhere.

I’ve just tried to import the zip file and it crashes out with something bad 081 and this in the logs:

[2024-03-26 00:20:06.160] [error] Error - DK0081: WP_PARSE_CONFIG: Invalid wp-config. cannot find DB_NAME variable
    at /Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:2:1002996
    at tryCatch (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1829201)
    at Generator.<anonymous> (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1830850)
    at Generator.next (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1829750)
    at asyncGeneratorStep (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1821046)
    at _next (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1821345)
[2024-03-26 00:20:06.192] [error] [validateBackupArchive] validating backup archive failed. Error - DK0081: WP_PARSE_CONFIG: Invalid wp-config. cannot find DB_NAME variable
    at /Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:2:1002996
    at tryCatch (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1829201)
    at Generator.<anonymous> (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1830850)
    at Generator.next (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1829750)
    at asyncGeneratorStep (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1821046)
    at _next (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1821345)
[2024-03-26 00:20:06.192] [error] [ipcMainStep] Error in operation SITE_CREATION, step validate: Error - DK0081: WP_PARSE_CONFIG: Invalid wp-config. cannot find DB_NAME variable
    at /Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:2:1002996
    at tryCatch (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1829201)
    at Generator.<anonymous> (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1830850)
    at Generator.next (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1829750)
    at asyncGeneratorStep (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1821046)
    at _next (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1821345)

I’ve wasted about 5 hours today, please can somebody help me diagnose what is going wrong. I just need to get a local dev environment going so I can deliver features.

Also the zip file has main files in /public/ and the wp-config.php DB_NAME is equal to the name of the sql file in the root folder of the zip.

Docker Desktop: Version 4.28.0 (139021)

Engine: 25.0.3

Compose: v2.24.6-desktop.1

Credential Helper: v0.8.1

Kubernetes: v1.29.1

DevKinsta: Version 2.13.2 (2.13.2.8698)

Operating System: MBP 2019, 2.4 GHz 8-Core Intel Core i9, 32gb ram, MacOS 14.4.1 (23E224)

Hi @rtpHarry :wave:

Welcome to the Kinsta Community. To assist you better, kindly send me the DevKinsta main.log file via private message. This way, I can examine it closely to identify the cause of the problem.

Thanks!

Thanks, I’ve sent it.

Hello @rtpHarry

The main.log indicates that there’s an issue with wp-config, precisely, that db_name variable is missing.

Please check the wp-config to confirm that it contains the line:

define( ‘DB_NAME’, ‘[database_name_here]’ );

It might be missing or mistakenly commented out.

Is this a standard WordPress install?

Kind regards

It’s in there, I first tried importing the .zip export from the kinsta site.

I’ve also tried creating my own one.

I’ve sent a screenshot of the zip and the wp-config to Adrian but i’ll send it to you now.

@rtpHarry

Please check our DM, I sent you a reply. :+1:

If anyone else is reading this thread in the future, looking for answers, it turned out there was a broken symlink in my wordpress root folder.

Removing that let the sync from live feature complete its sync.

However, the wp-config was replaced with junk text of the url repeating a ton of times, and the site doesn’t load for me. I’m working with support to try to resolve these.

So from further investigation, it seems like this site had a bunch of paths baked into the wp-config, so we disabled everything and it has mostly loaded up now.

One tip though, if you do end up having to rebuild your wp-config.php manually, use this for the db_host

define('DB_HOST', "devkinsta_db");

When I used the ip and port listed in devkinsta it just wouldn’t connect. I got that from creating a new blank site and checking the wp-config.php.

So this isn’t the actual solution to my original problem, but I’m marking it as solved anyway to cap it off.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.