Can't find WordPress install if WordPress core files are installed in a sub-directory
Closed this issue · 4 comments
I inherited a project that has a composer.json
file at the root of the repo, which when ran, will download WordPress into a wp
directory, as well as clone all needed plugins and the theme, into a wp-content
directory. So we run core WordPress files out of the wp
directory and then set a config in wp-config.php
to use our root wp-content
directory instead of the one in wp/wp-content
.
When trying to run the wpsnapshot command here, it tells me it's not a WordPress install. Looking at the code, this error happens when the wp-settings.php
file can't be found, which in our case that file is in the wp
directory, not within the root.
I tried moving that file up, just for testing, and that gets past the initial issue but causes other issues. Wasn't sure if there was a way to run wpsnapshots in a setup like this or if this is just a unique edge case that won't work.
Hey Darin, I actually pushed a fix for this yesterday. You just have to run wpsnapshots within the wp directory. Have you updated your copy since then?
I just installed this yesterday but it must have been right before your changes.
Just updated and running this now within the wp
directory, I'm not getting an error anymore but it's not doing anything at all. I get no output unless I add --verbose
but then all I get is Bootstrapping WordPress...
and it immediately stops.
As mentioned by Taylor, this particular issue has been solved. I had additional issues I had to figure out to get things working but the initial issue, with WordPress core files installed in a sub-directory, has been fixed.
I seem to be getting this with the 10uplocal docker app.
ticket opened here: 10up/wp-local-docker-v2#39
any help would be appreciated.