alexc7018 / vvv-site-wizard

Automates setting up new WordPress sites in Varying Vagrant Vagrants
GNU General Public License v2.0
347 stars 47 forks source link

nginx 403 Forbidden #20

Closed neilgee closed 9 years ago

neilgee commented 9 years ago

HI,

Just started getting a 'nginx 403 Forbidden' on newly created sites, also the database doesn't get populated, any troubleshooting tips for this.

The previously created sites still remain accessible, no custom configuration been applied to box.

Thanks

jacobdubail commented 9 years ago

Same issue here. I have a feeling it is related to the release of WP 4.0. The error message I get is:

==> default: PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'phar tar error: "/home/vagrant/.wp-cli/cache/core/en_US-4.0.tar.gz" already exists as a regular phar and must be deleted from disk prior to creating as a tar-based phar' in /srv/www/wp-cli/php/commands/core.php:93 ==> default: Stack trace: ==> default: #0 /srv/www/wp-cli/php/commands/core.php(93): PharData->__construct('/home/vagrant/....') ==> default: #1 /srv/www/wp-cli/php/commands/core.php(66): Core_Command::_extract('/home/vagrant/....', '/srv/www/metrat...') ==> default: #2 [internal function]: Core_Command->download(Array, Array) ==> default: #3 /srv/www/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(52): call_user_func(Array, Array, Array) ==> default: #4 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher{closure}(Array, Array) ==> default: #5 /srv/www/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(293): call_user_func(Object(Closure), Array, Array) ==> default: #6 /srv/www/wp-cli/php/WP_CLI/Runner.php(304): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array) ==> default: #7 /srv/www/wp-cli/php/WP_CLI/Runner.php(311): WP_CLI\Runne in /srv/www/wp-cli/php/commands/core.php on line 93 ==> default: Error: This does not seem to be a WordPress install. ==> default: Pass --path=path/to/wordpress or run wp core download. ==> default: Error: This does not seem to be a WordPress install. ==> default: Pass --path=path/to/wordpress or run wp core download.

If I manually install WordPress into the new directory, everything works.

neilgee commented 9 years ago

Yes same error:

==> default: Creating database 'sophiegrace' (if it does not exist)... ==> default: Installing WordPress (release version) in sophiegrace/htdocs... ==> default: Downloading WordPress 4.0 (en_US)... ==> default: Using cached file '/home/vagrant/.wp-cli/cache/core/en_US-4.0.tar.gz'... ==> default: PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'phar tar error: "/home/vagrant/.wp-cli/cache/core/en_US-4.0.tar.gz" already exists as a regular phar and must be deleted from disk prior to creating as a tar-based phar' in /srv/www/wp-cli/php/commands/core.php:93 ==> default: Stack trace: ==> default: #0 /srv/www/wp-cli/php/commands/core.php(93): PharData->__construct('/home/vagrant/....') ==> default: #1 /srv/www/wp-cli/php/commands/core.php(66): Core_Command::_extract('/home/vagrant/....', '/srv/www/sophie...') ==> default: #2 [internal function]: Core_Command->download(Array, Array) ==> default: #3 /srv/www/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(52): call_user_func(Array, Array, Array) ==> default: #4 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher{closure}(Array, Array) ==> default: #5 /srv/www/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(293): call_user_func(Object(Closure), Array, Array) ==> default: #6 /srv/www/wp-cli/php/WP_CLI/Runner.php(304): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array) ==> default: #7 /srv/www/wp-cli/php/WP_CLI/Runner.php(311): WP_CLI\Runne in /srv/www/wp-cli/php/commands/core.php on line 93 ==> default: Error: This does not seem to be a WordPress install. ==> default: Pass --path=path/to/wordpress or run wp core download. ==> default: Error: This does not seem to be a WordPress install. ==> default: Pass --path=path/to/wordpress or run wp core download. ==> default: /srv/www/sophiegrace

robneu commented 9 years ago

I had this issue the other day as well. Had to SSH into the Vagrant box and delete the cached copy of WordPress 4.0. After that, all was good.

The file you have to delete is the one referenced in the error above:

/home/vagrant/.wp-cli/cache/core/en_US-4.0.tar.gz

neilgee commented 9 years ago

Nice one Rob, yes this fixes it for me too.

jacobdubail commented 9 years ago

That fixed it for me, too! Thanks!

joelworsham commented 9 years ago

Did not work for me

EDIT: After further investigation, realized that the site wizard didn't install any wordpress files... htdocs was empty... After removing the site and then re-creating it, everything works now.

colinhahn commented 9 years ago

I had the same issue with WordPress 4.0.1. Deleting the files in /home/vagrant/.wp-cli/cache/core/ solved the issue. Since it seems like this is happening with each WordPress upgrade, I feel like the script needs to be adjusted to fix this

chriswgerber commented 9 years ago

It's an issue with WP CLI, not VVV.