Problems with theme paths after deploy - White screen

I’m having difficulties making the themes directory work. I’m getting the following error on the Wordpress admin:

ERROR: The theme directory “twentyfifteen” does not exist.

Here is my log info when deploying:

INFO[ea83b591] Running /usr/bin/env mkdir -p /tmp/app_dir/ on remoteserver.com
DEBUG[ea83b591] Command: ( WP_ENV=staging /usr/bin/env mkdir -p /tmp/app_dir/ )
INFO[ea83b591] Finished in 1.032 seconds with exit status 0 (successful).
DEBUGUploading /tmp/app_dir/git-ssh.sh 0.0%
INFOUploading /tmp/app_dir/git-ssh.sh 100.0%
INFO[672d242c] Running /usr/bin/env chmod +x /tmp/app_dir/git-ssh.sh on remoteserver.com
DEBUG[672d242c] Command: ( WP_ENV=staging /usr/bin/env chmod +x /tmp/app_dir/git-ssh.sh )
INFO[672d242c] Finished in 0.036 seconds with exit status 0 (successful).
DEBUG[d2681bac] Running /usr/bin/env git ls-remote -h git@bitbucket.org:user/repo.git on remoteserver.com
DEBUG[d2681bac] Command: ( WP_ENV=staging GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/app_dir/git-ssh.sh /usr/bin/env git ls-remote -h git@bitbucket.org:user/repo.git )
DEBUG[d2681bac] 	9feb1d613c0df1db1fa236715e7694fbe2ba516c	refs/heads/master
DEBUG[d2681bac] Finished in 0.389 seconds with exit status 0 (successful).
INFO[4bd19f8d] Running /usr/bin/env mkdir -pv ~/apps/stage_dir/shared ~/apps/stage_dir/releases on remoteserver.com
DEBUG[4bd19f8d] Command: ( WP_ENV=staging /usr/bin/env mkdir -pv ~/apps/stage_dir/shared ~/apps/stage_dir/releases )
INFO[4bd19f8d] Finished in 0.036 seconds with exit status 0 (successful).
INFO[84c8fe5e] Running /usr/bin/env mkdir -pv ~/apps/stage_dir/shared/web/app/uploads on remoteserver.com
DEBUG[84c8fe5e] Command: ( WP_ENV=staging /usr/bin/env mkdir -pv ~/apps/stage_dir/shared/web/app/uploads )
INFO[84c8fe5e] Finished in 0.060 seconds with exit status 0 (successful).
INFO[5cd929f2] Running /usr/bin/env mkdir -pv ~/apps/stage_dir/shared on remoteserver.com
DEBUG[5cd929f2] Command: ( WP_ENV=staging /usr/bin/env mkdir -pv ~/apps/stage_dir/shared )
INFO[5cd929f2] Finished in 0.029 seconds with exit status 0 (successful).
DEBUG[d1a8628b] Running /usr/bin/env [ -f ~/apps/stage_dir/shared/.env ] on remoteserver.com
DEBUG[d1a8628b] Command: [ -f ~/apps/stage_dir/shared/.env ]
DEBUG[d1a8628b] Finished in 0.041 seconds with exit status 0 (successful).
DEBUG[cb075c1e] Running /usr/bin/env [ -f ~/apps/stage_dir/current/REVISION ] on remoteserver.com
DEBUG[cb075c1e] Command: [ -f ~/apps/stage_dir/current/REVISION ]
DEBUG[cb075c1e] Finished in 0.046 seconds with exit status 0 (successful).
DEBUG[c4c3db06] Running /usr/bin/env cat ~/apps/stage_dir/current/REVISION 2>/dev/null on remoteserver.com
DEBUG[c4c3db06] Command: ( WP_ENV=staging /usr/bin/env cat ~/apps/stage_dir/current/REVISION 2>/dev/null )
DEBUG[c4c3db06] 	9feb1d6
DEBUG[c4c3db06] Finished in 0.034 seconds with exit status 0 (successful).
DEBUG[0cf6d73f] Running /usr/bin/env [ -f ~/apps/stage_dir/repo/HEAD ] on remoteserver.com
DEBUG[0cf6d73f] Command: [ -f ~/apps/stage_dir/repo/HEAD ]
DEBUG[0cf6d73f] Finished in 0.031 seconds with exit status 0 (successful).
INFOThe repository mirror is at ~/apps/stage_dir/repo
DEBUG[b8d8fdd9] Running /usr/bin/env if test ! -d ~/apps/stage_dir/repo; then echo "Directory does not exist '~/apps/stage_dir/repo'" 1>&2; false; fi on remoteserver.com
DEBUG[b8d8fdd9] Command: if test ! -d ~/apps/stage_dir/repo; then echo "Directory does not exist '~/apps/stage_dir/repo'" 1>&2; false; fi
DEBUG[b8d8fdd9] Finished in 0.030 seconds with exit status 0 (successful).
INFO[b0498f94] Running /usr/bin/env git remote update on remoteserver.com
DEBUG[b0498f94] Command: cd ~/apps/stage_dir/repo && ( WP_ENV=staging GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/app_dir/git-ssh.sh /usr/bin/env git remote update )
DEBUG[b0498f94] 	Fetching origin
INFO[b0498f94] Finished in 0.381 seconds with exit status 0 (successful).
DEBUG[c778be8b] Running /usr/bin/env if test ! -d ~/apps/stage_dir/repo; then echo "Directory does not exist '~/apps/stage_dir/repo'" 1>&2; false; fi on remoteserver.com
DEBUG[c778be8b] Command: if test ! -d ~/apps/stage_dir/repo; then echo "Directory does not exist '~/apps/stage_dir/repo'" 1>&2; false; fi
DEBUG[c778be8b] Finished in 0.026 seconds with exit status 0 (successful).
INFO[8848a036] Running /usr/bin/env mkdir -p ~/apps/stage_dir/releases/20150312014655 on remoteserver.com
DEBUG[8848a036] Command: cd ~/apps/stage_dir/repo && ( WP_ENV=staging GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/app_dir/git-ssh.sh /usr/bin/env mkdir -p ~/apps/stage_dir/releases/20150312014655 )
INFO[8848a036] Finished in 0.053 seconds with exit status 0 (successful).
INFO[b1be582c] Running /usr/bin/env git archive master | tar -x -C ~/apps/stage_dir/releases/20150312014655 on remoteserver.com
DEBUG[b1be582c] Command: cd ~/apps/stage_dir/repo && ( WP_ENV=staging GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/app_dir/git-ssh.sh /usr/bin/env git archive master | tar -x -C ~/apps/stage_dir/releases/20150312014655 )
INFO[b1be582c] Finished in 0.051 seconds with exit status 0 (successful).
DEBUG[064ee4e9] Running /usr/bin/env if test ! -d ~/apps/stage_dir/repo; then echo "Directory does not exist '~/apps/stage_dir/repo'" 1>&2; false; fi on remoteserver.com
DEBUG[064ee4e9] Command: if test ! -d ~/apps/stage_dir/repo; then echo "Directory does not exist '~/apps/stage_dir/repo'" 1>&2; false; fi
DEBUG[064ee4e9] Finished in 0.025 seconds with exit status 0 (successful).
DEBUG[973346e3] Running /usr/bin/env git rev-parse --short master on remoteserver.com
DEBUG[973346e3] Command: cd ~/apps/stage_dir/repo && ( WP_ENV=staging GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/app_dir/git-ssh.sh /usr/bin/env git rev-parse --short master )
DEBUG[973346e3] 	9feb1d6
DEBUG[973346e3] Finished in 0.040 seconds with exit status 0 (successful).
DEBUG[930c31a4] Running /usr/bin/env if test ! -d ~/apps/stage_dir/releases/20150312014655; then echo "Directory does not exist '~/apps/stage_dir/releases/20150312014655'" 1>&2; false; fi on remoteserver.com
DEBUG[930c31a4] Command: if test ! -d ~/apps/stage_dir/releases/20150312014655; then echo "Directory does not exist '~/apps/stage_dir/releases/20150312014655'" 1>&2; false; fi
DEBUG[930c31a4] Finished in 0.031 seconds with exit status 0 (successful).
INFO[75072d4f] Running /usr/bin/env echo "9feb1d6" >> REVISION on remoteserver.com
DEBUG[75072d4f] Command: cd ~/apps/stage_dir/releases/20150312014655 && ( WP_ENV=staging /usr/bin/env echo "9feb1d6" >> REVISION )
INFO[75072d4f] Finished in 0.042 seconds with exit status 0 (successful).
INFO[2f22e3a9] Running /usr/bin/env mkdir -pv ~/apps/stage_dir/releases/20150312014655 on remoteserver.com
DEBUG[2f22e3a9] Command: ( WP_ENV=staging /usr/bin/env mkdir -pv ~/apps/stage_dir/releases/20150312014655 )
INFO[2f22e3a9] Finished in 0.035 seconds with exit status 0 (successful).
DEBUG[5c4466a0] Running /usr/bin/env [ -L ~/apps/stage_dir/releases/20150312014655/.env ] on remoteserver.com
DEBUG[5c4466a0] Command: [ -L ~/apps/stage_dir/releases/20150312014655/.env ]
DEBUG[5c4466a0] Finished in 0.031 seconds with exit status 1 (failed).
DEBUG[c9a32af9] Running /usr/bin/env [ -f ~/apps/stage_dir/releases/20150312014655/.env ] on remoteserver.com
DEBUG[c9a32af9] Command: [ -f ~/apps/stage_dir/releases/20150312014655/.env ]
DEBUG[c9a32af9] Finished in 0.028 seconds with exit status 1 (failed).
INFO[49f910ad] Running /usr/bin/env ln -s ~/apps/stage_dir/shared/.env ~/apps/stage_dir/releases/20150312014655/.env on remoteserver.com
DEBUG[49f910ad] Command: ( WP_ENV=staging /usr/bin/env ln -s ~/apps/stage_dir/shared/.env ~/apps/stage_dir/releases/20150312014655/.env )
INFO[49f910ad] Finished in 0.038 seconds with exit status 0 (successful).
INFO[d2641942] Running /usr/bin/env mkdir -pv ~/apps/stage_dir/releases/20150312014655/web/app on remoteserver.com
DEBUG[d2641942] Command: ( WP_ENV=staging /usr/bin/env mkdir -pv ~/apps/stage_dir/releases/20150312014655/web/app )
INFO[d2641942] Finished in 0.035 seconds with exit status 0 (successful).
DEBUG[1533de32] Running /usr/bin/env [ -L ~/apps/stage_dir/releases/20150312014655/web/app/uploads ] on remoteserver.com
DEBUG[1533de32] Command: [ -L ~/apps/stage_dir/releases/20150312014655/web/app/uploads ]
DEBUG[1533de32] Finished in 0.030 seconds with exit status 1 (failed).
DEBUG[83ddfea7] Running /usr/bin/env [ -d ~/apps/stage_dir/releases/20150312014655/web/app/uploads ] on remoteserver.com
DEBUG[83ddfea7] Command: [ -d ~/apps/stage_dir/releases/20150312014655/web/app/uploads ]
DEBUG[83ddfea7] Finished in 0.034 seconds with exit status 1 (failed).
INFO[bfd160a5] Running /usr/bin/env ln -s ~/apps/stage_dir/shared/web/app/uploads ~/apps/stage_dir/releases/20150312014655/web/app/uploads on remoteserver.com
DEBUG[bfd160a5] Command: ( WP_ENV=staging /usr/bin/env ln -s ~/apps/stage_dir/shared/web/app/uploads ~/apps/stage_dir/releases/20150312014655/web/app/uploads )
INFO[bfd160a5] Finished in 0.034 seconds with exit status 0 (successful).
DEBUG[5d61f16d] Running /usr/bin/env if test ! -d ~/apps/stage_dir/releases/20150312014655; then echo "Directory does not exist '~/apps/stage_dir/releases/20150312014655'" 1>&2; false; fi on remoteserver.com
DEBUG[5d61f16d] Command: if test ! -d ~/apps/stage_dir/releases/20150312014655; then echo "Directory does not exist '~/apps/stage_dir/releases/20150312014655'" 1>&2; false; fi
DEBUG[5d61f16d] Finished in 0.031 seconds with exit status 0 (successful).
INFO[202a50cc] Running /usr/bin/composer5.6-sp install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader on remoteserver.com
DEBUG[202a50cc] Command: cd ~/apps/stage_dir/releases/20150312014655 && ( WP_ENV=staging /usr/bin/composer5.6-sp install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader )
INFO[202a50cc] Finished in 2.030 seconds with exit status 0 (successful).
INFO[8b9c08e9] Running /usr/bin/env rm -rf ~/apps/stage_dir/current on remoteserver.com
DEBUG[8b9c08e9] Command: ( WP_ENV=staging /usr/bin/env rm -rf ~/apps/stage_dir/current )
INFO[8b9c08e9] Finished in 0.038 seconds with exit status 0 (successful).
INFO[3ffa772a] Running /usr/bin/env ln -s ~/apps/stage_dir/releases/20150312014655 ~/apps/stage_dir/current on remoteserver.com
DEBUG[3ffa772a] Command: ( WP_ENV=staging /usr/bin/env ln -s ~/apps/stage_dir/releases/20150312014655 ~/apps/stage_dir/current )
INFO[3ffa772a] Finished in 0.035 seconds with exit status 0 (successful).
DEBUG[06db0cf6] Running /usr/bin/env if test ! -d ~/apps/stage_dir/releases/20150312014655; then echo "Directory does not exist '~/apps/stage_dir/releases/20150312014655'" 1>&2; false; fi on remoteserver.com
DEBUG[06db0cf6] Command: if test ! -d ~/apps/stage_dir/releases/20150312014655; then echo "Directory does not exist '~/apps/stage_dir/releases/20150312014655'" 1>&2; false; fi
DEBUG[06db0cf6] Finished in 0.027 seconds with exit status 0 (successful).
DEBUG[2e9426df] Running /usr/bin/env wp core is-installed on remoteserver.com
DEBUG[2e9426df] Command: cd ~/apps/stage_dir/releases/20150312014655 && ( WP_ENV=staging /usr/bin/env wp core is-installed )
DEBUG[2e9426df] 	Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
DEBUG[2e9426df] Finished in 0.158 seconds with exit status 0 (successful).
DEBUG[f4956870] Running /usr/bin/env wp option get stylesheet_root on remoteserver.com
DEBUG[f4956870] Command: cd ~/apps/stage_dir/releases/20150312014655 && ( WP_ENV=staging /usr/bin/env wp option get stylesheet_root )
DEBUG[f4956870] 	Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
DEBUG[f4956870] Finished in 0.125 seconds with exit status 0 (successful).
INFO[4ad8cc6b] Running /usr/bin/env wp option set stylesheet_root ~/apps/stage_dir/releases/20150312014655/web/wp/wp-content/themes on remoteserver.com
DEBUG[4ad8cc6b] Command: cd ~/apps/stage_dir/releases/20150312014655 && ( WP_ENV=staging /usr/bin/env wp option set stylesheet_root ~/apps/stage_dir/releases/20150312014655/web/wp/wp-content/themes )
DEBUG[4ad8cc6b] 	Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
INFO[4ad8cc6b] Finished in 0.122 seconds with exit status 0 (successful).
DEBUG[ee73141a] Running /usr/bin/env wp option get template_root on remoteserver.com
DEBUG[ee73141a] Command: cd ~/apps/stage_dir/releases/20150312014655 && ( WP_ENV=staging /usr/bin/env wp option get template_root )
DEBUG[ee73141a] 	Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
DEBUG[ee73141a] Finished in 0.134 seconds with exit status 0 (successful).
INFO[62025418] Running /usr/bin/env wp option set template_root ~/apps/stage_dir/releases/20150312014655/web/wp/wp-content/themes on remoteserver.com
DEBUG[62025418] Command: cd ~/apps/stage_dir/releases/20150312014655 && ( WP_ENV=staging /usr/bin/env wp option set template_root ~/apps/stage_dir/releases/20150312014655/web/wp/wp-content/themes )
DEBUG[62025418] 	Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
INFO[62025418] Finished in 0.137 seconds with exit status 0 (successful).
DEBUG[2f345581] Running /usr/bin/env ls -x ~/apps/stage_dir/releases on remoteserver.com
DEBUG[2f345581] Command: ( WP_ENV=staging /usr/bin/env ls -x ~/apps/stage_dir/releases )
DEBUG[2f345581] 	20150312014128	20150312014637	20150312014655
DEBUG[2f345581] Finished in 0.037 seconds with exit status 0 (successful).
INFOKeeping 2 of 3 deployed releases on remoteserver.com
INFO[21bbf3fc] Running /usr/bin/env rm -rf ~/apps/stage_dir/releases/20150312014128 on remoteserver.com
DEBUG[21bbf3fc] Command: ( WP_ENV=staging /usr/bin/env rm -rf ~/apps/stage_dir/releases/20150312014128 )
INFO[21bbf3fc] Finished in 0.109 seconds with exit status 0 (successful).
DEBUG[26b009f8] Running /usr/bin/env if test ! -d ~/apps/stage_dir/releases; then echo "Directory does not exist '~/apps/stage_dir/releases'" 1>&2; false; fi on remoteserver.com
DEBUG[26b009f8] Command: if test ! -d ~/apps/stage_dir/releases; then echo "Directory does not exist '~/apps/stage_dir/releases'" 1>&2; false; fi
DEBUG[26b009f8] Finished in 0.031 seconds with exit status 0 (successful).
INFO[3d33320b] Running /usr/bin/env echo "Branch master (at 9feb1d6) deployed as release 20150312014655 by maurocol03" >> ~/apps/stage_dir/revisions.log on remoteserver.com
DEBUG[3d33320b] Command: echo "Branch master (at 9feb1d6) deployed as release 20150312014655 by maurocol03" >> ~/apps/stage_dir/revisions.log
INFO[3d33320b] Finished in 0.032 seconds with exit status 0 (successful).

What stands out to me is this log info:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

I’m also seeing the following error on apache

[Wed Mar 11 12:19:39.192543 2015] [proxy_fcgi:error] [pid 13451:tid 140124650141440] [client 108.53.195.252:55758] AH01071: Got error 'Unable to open primary script: /srv/users/serverpilot/apps/stage_dir/public/wp/wp-admin/load-scripts.php (No such file or directory)\n', referer: http://dev.example.com/wp/wp-admin/themes.php

Not sure if it’s relevant but can’t seem to make it work. Any clues?

Well you should probably fix this error to begin with. Doubt it will ever work until you do that.

Usually it’s done with something like sudo apt-get install php5-mysql

I apologize in advance. Noob here and I’m in a DigitalOcean VPS with ServerPilot so bare with me please.

Your PHP installation appears to be missing the MySQL extension which is required by WordPress. went away after installing php5-mysql (thank you for the tip).

Now t here is a section of the current log from the deployment:

INFO[88a9a372] Running /usr/bin/env rm -rf ~/apps/stage_dir/current on remoteserver.com
DEBUG[88a9a372] Command: ( WP_ENV=staging /usr/bin/env rm -rf ~/apps/stage_dir/current )
INFO[88a9a372] Finished in 0.034 seconds with exit status 0 (successful).
INFO[cffb1e6a] Running /usr/bin/env ln -s ~/apps/stage_dir/releases/20150312114950 ~/apps/stage_dir/current on remoteserver.com
DEBUG[cffb1e6a] Command: ( WP_ENV=staging /usr/bin/env ln -s ~/apps/stage_dir/releases/20150312114950 ~/apps/stage_dir/current )
INFO[cffb1e6a] Finished in 0.038 seconds with exit status 0 (successful).
DEBUG[98a7e46c] Running /usr/bin/env if test ! -d ~/apps/stage_dir/releases/20150312114950; then echo "Directory does not exist '~/apps/stage_dir/releases/20150312114950'" 1>&2; false; fi on remoteserver.com
DEBUG[98a7e46c] Command: if test ! -d ~/apps/stage_dir/releases/20150312114950; then echo "Directory does not exist '~/apps/stage_dir/releases/20150312114950'" 1>&2; false; fi
DEBUG[98a7e46c] Finished in 0.039 seconds with exit status 0 (successful).
DEBUG[eb96ba28] Running /usr/bin/env wp core is-installed on remoteserver.com
DEBUG[eb96ba28] Command: cd ~/apps/stage_dir/releases/20150312114950 && ( WP_ENV=staging /usr/bin/env wp core is-installed )
DEBUG[eb96ba28] Finished in 0.597 seconds with exit status 0 (successful).
DEBUG[eb6f95d7] Running /usr/bin/env wp option get stylesheet_root on remoteserver.com
DEBUG[eb6f95d7] Command: cd ~/apps/stage_dir/releases/20150312114950 && ( WP_ENV=staging /usr/bin/env wp option get stylesheet_root )
DEBUG[eb6f95d7] Finished in 0.511 seconds with exit status 1 (failed).
DEBUG[dd4b897c] Running /usr/bin/env wp option get template_root on remoteserver.com
DEBUG[dd4b897c] Command: cd ~/apps/stage_dir/releases/20150312114950 && ( WP_ENV=staging /usr/bin/env wp option get template_root )
DEBUG[dd4b897c] Finished in 0.511 seconds with exit status 1 (failed).
DEBUG[0031a01b] Running /usr/bin/env ls -x ~/apps/stage_dir/releases on remoteserver.com
DEBUG[0031a01b] Command: ( WP_ENV=staging /usr/bin/env ls -x ~/apps/stage_dir/releases )
DEBUG[0031a01b] 	20150312021122	20150312114528	20150312114950
DEBUG[0031a01b] Finished in 0.040 seconds with exit status 0 (successful).
INFOKeeping 2 of 3 deployed releases on remoteserver.com
INFO[11232662] Running /usr/bin/env rm -rf ~/apps/stage_dir/releases/20150312021122 on remoteserver.com
DEBUG[11232662] Command: ( WP_ENV=staging /usr/bin/env rm -rf ~/apps/stage_dir/releases/20150312021122 )
INFO[11232662] Finished in 0.144 seconds with exit status 0 (successful).
DEBUG[404adb3f] Running /usr/bin/env if test ! -d ~/apps/stage_dir/releases; then echo "Directory does not exist '~/apps/stage_dir/releases'" 1>&2; false; fi on remoteserver.com
DEBUG[404adb3f] Command: if test ! -d ~/apps/stage_dir/releases; then echo "Directory does not exist '~/apps/stage_dir/releases'" 1>&2; false; fi
DEBUG[404adb3f] Finished in 0.031 seconds with exit status 0 (successful).
INFO[49629348] Running /usr/bin/env echo "Branch master (at 9feb1d6) deployed as release 20150312114950 by maurocol03" >> ~/apps/stage_dir/revisions.log on remoteserver.com
DEBUG[49629348] Command: echo "Branch master (at 9feb1d6) deployed as release

WP-CLI is installed. Any clues to what might be happening?

I believe I found the solution! At least it worked for me.

I noticed that the repo and staging server were missing some files. After some digging I realized that the my .gitignore file looked different compared to the bedrock repo. I believe this is where the change occurred:

Any background info on why was this fix that helped? Just for future reference and education purposes I guess.

Thanks!

1 Like

Don’t remember exactly but it would cause some files to be ignored that you might need (and probably did).