Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP DEBUG not showing from Duplicator Imported SItes #35

Open
neilgee opened this issue Jun 5, 2016 · 9 comments
Open

WP DEBUG not showing from Duplicator Imported SItes #35

neilgee opened this issue Jun 5, 2016 · 9 comments

Comments

@neilgee
Copy link

neilgee commented Jun 5, 2016

I sometimes use Duplicator packages to import sites into a blank VVV created site but after the import even though the wp-config.php file is present and WP_DEBUG is defined the VVV-Dashboard declares it as not installed.

Any workarounds for this?

@topdown
Copy link
Owner

topdown commented Jun 5, 2016

Couple things,
What version of the VVV Dashboard are you using? Do a pull to make sure you are using the latest 0.1.7 which has a ton of changes for loading hosts. Make sure you Purge the hosts after.
I assume you purged the host cache?

Could you give me detailed instructions of the process you use including creating the blank VVV site.
This will allow me to use your exact process to debug the issue.
Thanks

@neilgee
Copy link
Author

neilgee commented Jun 5, 2016

Using VVV Dashboard 0.1.7, yes I have purged the hosts cache.

How I am creating sites normally is with Variable VVV and that all works fine, but If i create a blank site with a blank db using vv create blank-with-db and then bring in a Duplicator package by running its installer.php script the site comes in fine but in VVV Dashboard it says the debug mode is not installed.

@topdown
Copy link
Owner

topdown commented Jun 5, 2016

OK, I will test that process and get back to you.
Thanks.

@topdown
Copy link
Owner

topdown commented Jun 6, 2016

Ok, so using this process causes some issues, but not just with VVV Dashboard, but it will break vagrant up also because it will not run the correct procedures on the new blank site because the vvv-init.sh is not right. Its fairly easy to fix.

When you use a plugin like Duplicator and/or create a blank site, you have to modify the vvv-init.sh file. Also for all features of VVV Dashboard to work you need a wp-cli.yml file.

If you look at another WP site created with vv create and compare the root folder you will see the changes and missing items. But here is a breakdown

Go to your VVV/www/your_site folder
Create a file named wp-cli.yml
in it put path: htdocs
No new lines or trailing white space.

Then open that sites vvv-init.sh in an editor
You need to make it look like this, changing blank/htdocs...' to the correct path --dbname="blank" to the correct database and --url=blank.dev to the correct URL and if any of the other database creds are not correct, Eg. --dbuser=wp --dbpass=wp

if [ ! -d "htdocs/wp-admin" ]; then
    echo 'Installing WordPress (release version) in blank/htdocs...'
    if [ ! -d "./htdocs" ]; then
        mkdir ./htdocs
    fi
    cd ./htdocs
    wp core download --locale=en_US --allow-root 
    wp core config --dbname="blank" --dbuser=wp --dbpass=wp --dbhost="localhost" --dbprefix=wp_ --locale=en_US --allow-root --extra-php <<PHP
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', true);
define('SCRIPT_DEBUG', true);
define('JETPACK_DEV_DEBUG', true);
PHP
    wp core install --url=blank.dev --title="blank" --admin_user=admin --admin_password=password --admin_email=admin@localhost.dev --allow-root

    cd -
fi

Purge the hosts and you should see it working properly now. Vagrant should also properly do backups and provisions for this site now also.

@neilgee
Copy link
Author

neilgee commented Jun 7, 2016

Many thanks for the detailed response Jeff, I will be setting a few up like this in the next few days and will try it out.

@topdown
Copy link
Owner

topdown commented Jun 18, 2016

@neilgee did you get this working?

@neilgee
Copy link
Author

neilgee commented Jun 19, 2016

Hi Jeff, I tried a couple of times on 2 different sites but Dashboard still declares the debug as Not Installed - I have purged all caches and run a vagrant halt and vagrant up

I have changed both wp-cli.yml and vvv-init.sh as in your snippet, example below...

if [ ! -d "htdocs/wp-admin" ]; then
    echo 'Installing WordPress (release version) in ludwina2/htdocs...'
    if [ ! -d "./htdocs" ]; then
        mkdir ./htdocs
    fi
    cd ./htdocs
    wp core download --locale=en_US --allow-root
    wp core config --dbname="ludwina2" --dbuser=wp --dbpass=wp --dbhost="localhost" --dbprefix=wp_ --locale=en_US --allow-root --extra-php <<PHP
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', true);
define('SCRIPT_DEBUG', true);
define('JETPACK_DEV_DEBUG', true);
PHP
    wp core install --url=ludwina2.dev --title="blank" --admin_user=admin --admin_password=password --admin_email=admin@localhost.dev --allow-root

    cd -
fi

@topdown
Copy link
Owner

topdown commented Jun 19, 2016

Weird, your whole import process worked for me.
Just out of curiosity, and I believe I check for both. But could you see if define('WP_DEBUG', true); in your wp-config.php is using single quotes or double?

@neilgee
Copy link
Author

neilgee commented Jun 19, 2016

Singles

define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', true);
define('SCRIPT_DEBUG', true);
define('JETPACK_DEV_DEBUG', true);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants