Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.
Ash Davies edited this page Nov 15, 2018 · 4 revisions

wp-deploy: FAQ

Frequently asked questions on and around wp-deploy


Generic

How does wp-deploy actually work?

For deployment, capistrano uses your git credentials to clone down the project onto the server called repo. Your uploads and other generated files (.htaccess etc) will be put into a shared folder adjacent to the repo one. Capistrano will then symlink those into a releases folder and then current folder.

Can I rollback to a previous deployment?

You can indeed! By default, wp-deploy allows allows for 5 releases, although this can be changed in your config/deploy.rb, under the variable keep_releases. If you'd like then like to rollback to a previous release, use the following command:

$ bundle exec cap <ENVIRONMENT> deploy:rollback

Want to rollback not once but twice? Run the command aas many times as you want, as long as theres a release in there it'll work!

How do I update WordPress

Our Usage guide covers this under the section entitled: Updating WordPress & Plugins

Do you support WordPress Multisite?

Unfortunately we don't as we've never had to work with it for a wp-deploy site. If you'd like to try and support this then feel free, we'd love to test it with you!

I've set up a new project locally but I'm getting a blank screen

wp-deploy doesn't come with a theme by default. Go into content/themes and add your theme from there. You'll then need to go to your admin area: http://SITEURL/wordpress/wp-admin to assign it.

I'm seeing the Apache screen on my remote environment

Take a look at your vhosts not being setup correctly on the server. wp-deploy requires that you have all vhosts pointing to the current folder. for example: /www/mycoolwebsite/httpdocs/current

How can I update to a particular version of WordPress?

Instead of using the bundle exec cap <ENVIRONMENT> wp:core:update command, you can always do this manually.

To do so, within Command Line navigate to your WordPress submodule. Within there pull down any new tags (WordPress uses tags for each of its releases)

$ cd wordpress
$ git checkout master
$ git fetch --tags

Once you've done that, look at the tags and checkout into the version you'd like to. i.e. if I wanted version 4.4.2:

git tag
git checkout 4.4.2

Then go back into the root of your project and commit your changes, like so:

$ cd ../
$ git add -A
$ git commit -m "Update WordPress to 4.4.2"

Error messages

Errno::ENOENT: No such file or directory @ rb_sysopen - config/database.yml

You need to setup your database.yml. Take a look at our Installation guide.

wp stderr: Error: Can’t select database

wpdeploy cannot connect to your database in order to install WordPress. Take a look at our Installation guide under the section of Database Config.

wp stderr: Error: This does not seem to be a WordPress install.

You've probably not downloaded the WordPress submodule. Go into Command line and run the following:

git submodule update --init

Permission denied (publickey)

Make sure you have SSH access from your local machine to your Github account, you can test this by:

$ ssh git@github.com

and make sure you have SSH access from your local machine to the server, i.e.

$ ssh user@ipaddress

Once you have this, make sure to add your private key to your authentication agent.

$ ssh-add -K ~/.ssh/id_rsa