aaemnnosttv / wp-cli-valet-command

Harness the power of Laravel Valet for creating fully functional WordPress installs in seconds.
https://aaemnnost.tv/wp-cli-commands/valet/
299 stars 31 forks source link

wp-config.php already exist #60

Closed korndev closed 4 years ago

korndev commented 5 years ago

When running the wp valet new command, I'm getting the following error: Error: The 'wp-config.php' file already exists.

When I look in the project directory, the wp-config.php file does not exist.

As a side note, in case it matters, I'm using Valet Plus (https://github.com/weprovide/valet-plus)

Full command I'm attempting to run:

wp valet new aaproject --dbname="valet_aaproject" --dbuser="root" --dbpass="" --dbprefix="wp_" --admin_user="justin" --admin_password="local" --admin_email="justin@valet.localhost"

WP Cli details

$ wp cli info
OS: Darwin 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
Shell:  /bin/bash
PHP binary: /usr/local/Cellar/valet-php@7.1/7.1.32_2/bin/php
PHP version:    7.1.32
php.ini used:   /usr/local/etc/valet-php/7.1/php.ini
WP-CLI root dir:    phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:  phar://wp-cli.phar/vendor
WP_CLI phar path:   /Users/justin/Dropbox/Documents/Sites
WP-CLI packages dir:    /Users/justin/.wp-cli/packages/
WP-CLI global config:   
WP-CLI project config:  
WP-CLI version: 2.3.0

If you need any further details, please let me know.

aaemnnosttv commented 4 years ago

Sorry for the delay here. I've never used Valet plus, but it shouldn't affect how wp-cli commands run.

Is this still an issue for you?

korndev commented 4 years ago

I couldn't get it to work as I wanted with valet plus. I've moved on.

GeoJunkie commented 4 years ago

If your aaproject folder already exists, it won't work properly. Run this command from your sites folder, creating a new site that doesn't exist yet.

aaemnnosttv commented 4 years ago

Thanks for chiming in @GeoJunkie. Indeed the command won't work if a site already exists by the same name but I don't think this was what @korndev was experiencing. The command has a fairly robust set of tests which ensures all of the commands/features are working as expected, but it's possible there may have been something about his environment in particular which was throwing a wrench in things as an edge-case.

Closing this for now, but feel free to reopen with more details about how to reproduce this on the latest version 😄