mixd / wp-deploy Goto Github PK
View Code? Open in Web Editor NEWCapistrano powered WordPress deployment.
License: GNU General Public License v3.0
Capistrano powered WordPress deployment.
License: GNU General Public License v3.0
Hi, I'm running wp-deploy in a project and when I clone my repo, it downloads all the Wordpress Repository, around 200MB, even if there's a link to a specific commit.
Is there a way to avoid this and checkout only the related commit or tag?
Thank you!
Your documentation mentions it uses find and replace when migrating the database. While I imagine it changes the url, from say local.example.com to stage.example.com, however does it also update paths, ie: /Users/name/wwww/ to /var/www etc? Finally, does it detect serialized data (ie: widgets) and apply special find and replaces since normal ones can corrupt the data.
When executing bundle exec cap staging wp:setup:remote
, I get the following error:
[88b80465] Running /usr/bin/env [ -d /home1/webdevea/public_html/staging/repo/.git ] on staging.myhousehold.co
DEBUG [88b80465] Command: [ -d /home1/webdevea/public_html/staging/repo/.git ]
DEBUG [88b80465] Finished in 3.686 seconds with exit status 1 (failed).
Capistrano can't find the repo
folder. It might be an incorrect order of execution.
Hi
I am getting an error when trying to deploy a new plugin to my remote server. I get the error on cap deploy. The plugin is found at:-
http://pogidude.com/plugins/popular-posts-tabbed-widget-for-jetpack/
Please the output I get:-
Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: git exit status: 1
git stdout: No submodule mapping found in .gitmodules for path 'content/plugins/popular-posts-tab-widget-for-jetpack'
git stderr: Nothing written
SSHKit::Command::Failed: git exit status: 1
git stdout: No submodule mapping found in .gitmodules for path 'content/plugins/popular-posts-tab-widget-for-jetpack'
git stderr: Nothing written
Tasks: TOP => git:create_release
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as [email protected]: git exit status: 1
git stdout: No submodule mapping found in .gitmodules for path 'content/plugins/popular-posts-tab-widget-for-jetpack'
git stderr: Nothing written
I'm trying to clean up some of the file structure, and I think .wpignore
is a good candidate for removal. I see these ignores as deployment configuration and thus I think it belongs in the config directory or an existing config file.
It think it would it be nice to replace the .wpignore file with a Capistrano set
like this:
set :wp_ignore, %w{/lib /config Capfile Rakefile Gemfile Gemfile.lock readme.md .gitattributes .gitignore .gitmodules}
Other pros of this is that ignores can be specified per environment if needed.
Hi Luke
I am getting an error when trying to deploy a new plugin to my remote server. I get the error on cap deploy. The plugin is found at:-
http://pogidude.com/plugins/popular-posts-tabbed-widget-for-jetpack/
Please the output I get:-
Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: git exit status: 1
git stdout: No submodule mapping found in .gitmodules for path 'content/plugins/popular-posts-tab-widget-for-jetpack'
git stderr: Nothing written
SSHKit::Command::Failed: git exit status: 1
git stdout: No submodule mapping found in .gitmodules for path 'content/plugins/popular-posts-tab-widget-for-jetpack'
git stderr: Nothing written
Tasks: TOP => git:create_release
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as [email protected]: git exit status: 1
git stdout: No submodule mapping found in .gitmodules for path 'content/plugins/popular-posts-tab-widget-for-jetpack'
git stderr: Nothing written
Hi,
I am using bitbucket as my git repo and I've added the ssh key of my server to the repo (tried git clone there and it worked).
This error pops up when trying to deploy to the server.
** Execute git:update
cap aborted!
cd /home/wp-test/repo && git rev-parse --short HEAD stdout: Nothing written
cd /home/wp-test/repo && git rev-parse --short HEAD stderr: Nothing written
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/sshkit-1.3.0/lib/sshkit/command.rb:94:in `exit_status='
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:142:in `block (4 levels) in _execute'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/channel.rb:551:in `call'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/channel.rb:551:in `do_request'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:561:in `channel_request'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:221:in `preprocess'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:205:in `process'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `block in loop'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/channel.rb:269:in `wait'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:164:in `block (2 levels) in _execute'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/channel.rb:514:in `call'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/channel.rb:514:in `do_open_confirmation'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:545:in `channel_open_confirmation'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:221:in `preprocess'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:205:in `process'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `block in loop'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:166:in `block in _execute'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:123:in `tap'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:123:in `_execute'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:76:in `capture'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-3.1.0/lib/capistrano/dsl.rb:59:in `fetch_revision'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-3.1.0/lib/capistrano/dsl.rb:30:in `capturing_revisions'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-3.1.0/lib/capistrano/tasks/git.rake:52:in `block (4 levels) in <top (required)>'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/sshkit-1.3.0/lib/sshkit/backends/abstract.rb:81:in `within'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-3.1.0/lib/capistrano/tasks/git.rake:51:in `block (3 levels) in <top (required)>'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:54:in `run'
/Users/joaomamede/.rvm/gems/ruby-1.9.3-p374/gems/sshkit-1.3.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => git:create_release => git:update
The deploy has failed with an error: #<SSHKit::Command::Failed: cd /home/wp-test/repo && git rev-parse --short HEAD stdout: Nothing written
cd /home/wp-test/repo && git rev-parse --short HEAD stderr: Nothing written
On various servers, if the cache file (/repo) exists in the project, I'm unable to commit my changes. It's only possible once you SSH into the server and delete the repo file.
cap production deploy
/Users/jasonhobbs/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/sshkit-1.3.0/lib/sshkit.rb:3: warning: already initialized constant SSHKit::StandardError
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/sshkit-1.3.0/lib/sshkit.rb:3: warning: previous definition of StandardError was here
INFO [90b8d0bf] Running /usr/bin/env mkdir -p /tmp/NLAG-Website/ on nlag-server-master-001.mixd.co.uk
DEBUG [90b8d0bf] Command: /usr/bin/env mkdir -p /tmp/NLAG-Website/
INFO [90b8d0bf] Finished in 1.122 seconds with exit status 0 (successful).
DEBUG Uploading /tmp/NLAG-Website/git-ssh.sh 0.0%
INFO Uploading /tmp/NLAG-Website/git-ssh.sh 100.0%
INFO [2e4293ff] Running /usr/bin/env chmod +x /tmp/NLAG-Website/git-ssh.sh on nlag-server-master-001.mixd.co.uk
DEBUG [2e4293ff] Command: /usr/bin/env chmod +x /tmp/NLAG-Website/git-ssh.sh
INFO [2e4293ff] Finished in 0.060 seconds with exit status 0 (successful).
INFO [c9b3a250] Running /usr/bin/env mkdir -p /tmp/NLAG-Website/ on nlag-server-master-001.mixd.co.uk
DEBUG [c9b3a250] Command: /usr/bin/env mkdir -p /tmp/NLAG-Website/
INFO [c9b3a250] Finished in 0.062 seconds with exit status 0 (successful).
DEBUG Uploading /tmp/NLAG-Website/git-ssh.sh 0.0%
INFO Uploading /tmp/NLAG-Website/git-ssh.sh 100.0%
INFO [dc672dc4] Running /usr/bin/env chmod +x /tmp/NLAG-Website/git-ssh.sh on nlag-server-master-001.mixd.co.uk
DEBUG [dc672dc4] Command: /usr/bin/env chmod +x /tmp/NLAG-Website/git-ssh.sh
INFO [dc672dc4] Finished in 0.063 seconds with exit status 0 (successful).
DEBUG [cfb46d5b] Running /usr/bin/env git ls-remote [email protected]:Mixd/NLAG-Website.git on nlag-server-master-001.mixd.co.uk
DEBUG [cfb46d5b] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/NLAG-Website/git-ssh.sh /usr/bin/env git ls-remote [email protected]:Mixd/NLAG-Website.git )
DEBUG [cfb46d5b] 2d80b0ed3fc874485c2dd8f1837714bf2a11c802 HEAD
DEBUG [cfb46d5b] 0e0e59b330e463d6447a24d676032280c9c6499f refs/heads/development
DEBUG [cfb46d5b] 2d80b0ed3fc874485c2dd8f1837714bf2a11c802 refs/heads/master
DEBUG [cfb46d5b] Finished in 1.678 seconds with exit status 0 (successful).
DEBUG [cf576c79] Running /usr/bin/env git ls-remote [email protected]:Mixd/NLAG-Website.git on nlag-server-master-001.mixd.co.uk
DEBUG [cf576c79] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/NLAG-Website/git-ssh.sh /usr/bin/env git ls-remote [email protected]:Mixd/NLAG-Website.git )
DEBUG [cf576c79] 2d80b0ed3fc874485c2dd8f1837714bf2a11c802 HEAD
DEBUG [cf576c79] 0e0e59b330e463d6447a24d676032280c9c6499f refs/heads/development
DEBUG [cf576c79] 2d80b0ed3fc874485c2dd8f1837714bf2a11c802 refs/heads/master
DEBUG [cf576c79] Finished in 1.719 seconds with exit status 0 (successful).
INFO [2d5a4aaf] Running /usr/bin/env mkdir -pv /var/www/vhosts/nlg.nhs.uk/httpdocs/shared /var/www/vhosts/nlg.nhs.uk/httpdocs/releases on nlag-server-master-001.mixd.co.uk
DEBUG [2d5a4aaf] Command: /usr/bin/env mkdir -pv /var/www/vhosts/nlg.nhs.uk/httpdocs/shared /var/www/vhosts/nlg.nhs.uk/httpdocs/releases
INFO [2d5a4aaf] Finished in 0.061 seconds with exit status 0 (successful).
INFO [5bdbee8e] Running /usr/bin/env mkdir -pv /var/www/vhosts/nlg.nhs.uk/httpdocs/shared/content/uploads on nlag-server-master-001.mixd.co.uk
DEBUG [5bdbee8e] Command: /usr/bin/env mkdir -pv /var/www/vhosts/nlg.nhs.uk/httpdocs/shared/content/uploads
INFO [5bdbee8e] Finished in 0.062 seconds with exit status 0 (successful).
INFO [2d77871e] Running /usr/bin/env mkdir -pv /var/www/vhosts/nlg.nhs.uk/httpdocs/shared /var/www/vhosts/nlg.nhs.uk/httpdocs/shared on nlag-server-master-001.mixd.co.uk
DEBUG [2d77871e] Command: /usr/bin/env mkdir -pv /var/www/vhosts/nlg.nhs.uk/httpdocs/shared /var/www/vhosts/nlg.nhs.uk/httpdocs/shared
INFO [2d77871e] Finished in 0.061 seconds with exit status 0 (successful).
INFO [117adfb3] Running /usr/bin/env touch /var/www/vhosts/nlg.nhs.uk/httpdocs/shared/wp-config.php on nlag-server-master-001.mixd.co.uk
DEBUG [117adfb3] Command: /usr/bin/env touch /var/www/vhosts/nlg.nhs.uk/httpdocs/shared/wp-config.php
INFO [117adfb3] Finished in 0.100 seconds with exit status 0 (successful).
INFO [c7f4d685] Running /usr/bin/env touch /var/www/vhosts/nlg.nhs.uk/httpdocs/shared/.htaccess on nlag-server-master-001.mixd.co.uk
DEBUG [c7f4d685] Command: /usr/bin/env touch /var/www/vhosts/nlg.nhs.uk/httpdocs/shared/.htaccess
INFO [c7f4d685] Finished in 0.062 seconds with exit status 0 (successful).
DEBUG [a274a2ff] Running /usr/bin/env [ -f /var/www/vhosts/nlg.nhs.uk/httpdocs/shared/wp-config.php ] on nlag-server-master-001.mixd.co.uk
DEBUG [a274a2ff] Command: [ -f /var/www/vhosts/nlg.nhs.uk/httpdocs/shared/wp-config.php ]
DEBUG [a274a2ff] Finished in 0.057 seconds with exit status 0 (successful).
DEBUG [12aa30f3] Running /usr/bin/env [ -f /var/www/vhosts/nlg.nhs.uk/httpdocs/shared/.htaccess ] on nlag-server-master-001.mixd.co.uk
DEBUG [12aa30f3] Command: [ -f /var/www/vhosts/nlg.nhs.uk/httpdocs/shared/.htaccess ]
DEBUG [12aa30f3] Finished in 0.065 seconds with exit status 0 (successful).
DEBUG [fb00fa40] Running /usr/bin/env [ -d /var/www/vhosts/nlg.nhs.uk/httpdocs/repo/.git ] on nlag-server-master-001.mixd.co.uk
DEBUG [fb00fa40] Command: [ -d /var/www/vhosts/nlg.nhs.uk/httpdocs/repo/.git ]
DEBUG [fb00fa40] Finished in 0.058 seconds with exit status 0 (successful).
INFO The repository mirror is at /var/www/vhosts/nlg.nhs.uk/httpdocs/repo
DEBUG [c2af5d04] Running /usr/bin/env [ -d /var/www/vhosts/nlg.nhs.uk/httpdocs/repo/.git ] on nlag-server-master-001.mixd.co.uk
DEBUG [c2af5d04] Command: [ -d /var/www/vhosts/nlg.nhs.uk/httpdocs/repo/.git ]
DEBUG [c2af5d04] Finished in 0.059 seconds with exit status 0 (successful).
INFO The repository mirror is at /var/www/vhosts/nlg.nhs.uk/httpdocs/repo
DEBUG [0e576211] Running /usr/bin/env if test ! -d /var/www/vhosts/nlg.nhs.uk/httpdocs/repo; then echo "Directory does not exist '/var/www/vhosts/nlg.nhs.uk/httpdocs/repo'" 1>&2; false; fi on nlag-server-master-001.mixd.co.uk
DEBUG [0e576211] Command: if test ! -d /var/www/vhosts/nlg.nhs.uk/httpdocs/repo; then echo "Directory does not exist '/var/www/vhosts/nlg.nhs.uk/httpdocs/repo'" 1>&2; false; fi
DEBUG [0e576211] Finished in 0.058 seconds with exit status 0 (successful).
DEBUG [fdaa83c7] Running /usr/bin/env cd /var/www/vhosts/nlg.nhs.uk/httpdocs/repo && git rev-parse --short HEAD on nlag-server-master-001.mixd.co.uk
DEBUG [fdaa83c7] Command: cd /var/www/vhosts/nlg.nhs.uk/httpdocs/repo && git rev-parse --short HEAD
DEBUG [fdaa83c7] 2d80b0e
DEBUG [fdaa83c7] Finished in 0.063 seconds with exit status 0 (successful).
INFO [83ede2e0] Running /usr/bin/env git remote update on nlag-server-master-001.mixd.co.uk
DEBUG [83ede2e0] Command: cd /var/www/vhosts/nlg.nhs.uk/httpdocs/repo && /usr/bin/env git remote update
DEBUG [83ede2e0] Fetching origin
INFO [83ede2e0] Finished in 2.719 seconds with exit status 0 (successful).
DEBUG [d1b0c497] Running /usr/bin/env cd /var/www/vhosts/nlg.nhs.uk/httpdocs/repo && git rev-parse --short HEAD on nlag-server-master-001.mixd.co.uk
DEBUG [d1b0c497] Command: cd /var/www/vhosts/nlg.nhs.uk/httpdocs/repo && git rev-parse --short HEAD
DEBUG [d1b0c497] 2d80b0e
DEBUG [d1b0c497] Finished in 0.069 seconds with exit status 0 (successful).
DEBUG [d7b3f7c5] Running /usr/bin/env if test ! -d /var/www/vhosts/nlg.nhs.uk/httpdocs/repo; then echo "Directory does not exist '/var/www/vhosts/nlg.nhs.uk/httpdocs/repo'" 1>&2; false; fi on nlag-server-master-001.mixd.co.uk
DEBUG [d7b3f7c5] Command: if test ! -d /var/www/vhosts/nlg.nhs.uk/httpdocs/repo; then echo "Directory does not exist '/var/www/vhosts/nlg.nhs.uk/httpdocs/repo'" 1>&2; false; fi
DEBUG [d7b3f7c5] Finished in 0.057 seconds with exit status 0 (successful).
DEBUG [da20351c] Running /usr/bin/env cd /var/www/vhosts/nlg.nhs.uk/httpdocs/repo && git rev-parse --short HEAD on nlag-server-master-001.mixd.co.uk
DEBUG [da20351c] Command: cd /var/www/vhosts/nlg.nhs.uk/httpdocs/repo && git rev-parse --short HEAD
DEBUG [da20351c] 2d80b0e
DEBUG [da20351c] Finished in 0.064 seconds with exit status 0 (successful).
INFO [6d19a602] Running /usr/bin/env git remote update on nlag-server-master-001.mixd.co.uk
DEBUG [6d19a602] Command: cd /var/www/vhosts/nlg.nhs.uk/httpdocs/repo && /usr/bin/env git remote update
DEBUG [6d19a602] Fetching origin
INFO [6d19a602] Finished in 1.802 seconds with exit status 0 (successful).
DEBUG [82230d57] Running /usr/bin/env cd /var/www/vhosts/nlg.nhs.uk/httpdocs/repo && git rev-parse --short HEAD on nlag-server-master-001.mixd.co.uk
DEBUG [82230d57] Command: cd /var/www/vhosts/nlg.nhs.uk/httpdocs/repo && git rev-parse --short HEAD
DEBUG [82230d57] 2d80b0e
DEBUG [82230d57] Finished in 0.066 seconds with exit status 0 (successful).
DEBUG [38497b19] Running /usr/bin/env if test ! -d /var/www/vhosts/nlg.nhs.uk/httpdocs/repo; then echo "Directory does not exist '/var/www/vhosts/nlg.nhs.uk/httpdocs/repo'" 1>&2; false; fi on nlag-server-master-001.mixd.co.uk
DEBUG [38497b19] Command: if test ! -d /var/www/vhosts/nlg.nhs.uk/httpdocs/repo; then echo "Directory does not exist '/var/www/vhosts/nlg.nhs.uk/httpdocs/repo'" 1>&2; false; fi
DEBUG [38497b19] Finished in 0.060 seconds with exit status 0 (successful).
INFO [8859bca8] Running /usr/bin/env mkdir -p /var/www/vhosts/nlg.nhs.uk/httpdocs/releases/20140602091001 on nlag-server-master-001.mixd.co.uk
DEBUG [8859bca8] Command: cd /var/www/vhosts/nlg.nhs.uk/httpdocs/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/NLAG-Website/git-ssh.sh /usr/bin/env mkdir -p /var/www/vhosts/nlg.nhs.uk/httpdocs/releases/20140602091001 )
INFO [8859bca8] Finished in 0.063 seconds with exit status 0 (successful).
INFO [d0aa507e] Running /usr/bin/env git checkout -B 20140602091001 origin/master on nlag-server-master-001.mixd.co.uk
DEBUG [d0aa507e] Command: cd /var/www/vhosts/nlg.nhs.uk/httpdocs/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/NLAG-Website/git-ssh.sh /usr/bin/env git checkout -B 20140602091001 origin/master )
DEBUG [d0aa507e] Switched to a new branch '20140602091001'
DEBUG [d0aa507e] M wordpress
DEBUG [d0aa507e] Branch 20140602091001 set up to track remote branch master from origin.
DEBUG [d0aa507e] Switched to a new branch '20140602091001'
INFO [d0aa507e] Finished in 0.114 seconds with exit status 0 (successful).
INFO [bd5ed3ff] Running /usr/bin/env git submodule update --init on nlag-server-master-001.mixd.co.uk
DEBUG [bd5ed3ff] Command: cd /var/www/vhosts/nlg.nhs.uk/httpdocs/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/NLAG-Website/git-ssh.sh /usr/bin/env git submodule update --init )
DEBUG [bd5ed3ff] Submodule 'wordpress' () registered for path 'wordpress'
DEBUG [bd5ed3ff] Submodule 'wordpress' () registered for path 'wordpress'
DEBUG [bd5ed3ff] fatal: reference is not a tree: d101cb394733f3a7d3fe6d935df0610ec2510057
DEBUG [bd5ed3ff] Submodule 'wordpress' () registered for path 'wordpress'
DEBUG [bd5ed3ff] Unable to checkout 'd101cb394733f3a7d3fe6d935df0610ec2510057' in submodule path 'wordpress'
cap aborted!
git stdout: Nothing written
git stderr: Nothing written
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/channel.rb:551:in `call'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/channel.rb:551:in `do_request'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:561:in `channel_request'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:221:in `preprocess'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:205:in `process'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `block in loop'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/channel.rb:269:in `wait'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/channel.rb:514:in `call'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/channel.rb:514:in `do_open_confirmation'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:545:in `channel_open_confirmation'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:221:in `preprocess'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:205:in `process'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `block in loop'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/capistrano-3.1.0/lib/capistrano/git.rb:11:in `git'
/Applications/MAMP/htdocs/NLAG-Website/lib/capistrano/submodule_strategy.rb:31:in `release'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/capistrano-3.1.0/lib/capistrano/tasks/git.rake:65:in `block (5 levels) in <top (required)>'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/capistrano-3.1.0/lib/capistrano/tasks/git.rake:63:in `block (4 levels) in <top (required)>'
/Users/jasonhobbs/.rvm/gems/ruby-2.1.1@global/gems/capistrano-3.1.0/lib/capistrano/tasks/git.rake:62:in `block (3 levels) in <top (required)>'
Tasks: TOP => git:create_release
(See full trace by running task with --trace)
The deploy has failed with an error: #<SSHKit::Command::Failed: git stdout: Nothing written
git stderr: Nothing written
Hi I am trying to setup wordpress in Greek. I am setting define('WPLANG', 'el');
in wp-config.php in the shared folder on the server and also uploaded the po and mo files in content/languages.
But it's not working.. Am I doing something wrong, or do I have to make a different configuration?
I have this problem
DEBUG [cea5cdf7] Command: rsync -ar --filter=':- .wpignore' --exclude=.git* /var/www/example.com/repo/ /var/www/example.com/releases/20150125190422
DEBUG [cea5cdf7] zsh:1: no matches found: --exclude=.git*
Found this topic
Escaped here with double backslash instead of only one, then everything worked perfectly.
Hello,
the capistrano deployment fails with this error:
$ bundle exec cap production wp:setup:remote
INFO [b561e4b9] Running /usr/bin/env mkdir -p /tmp/myapplication/ on MYIP_ADDRESS
INFO [b561e4b9] Finished in 0.113 seconds with exit status 0 (successful).
INFO Uploading /tmp/myapplication/git-ssh.sh 100.0%
INFO [cdf243ea] Running /usr/bin/env chmod +x /tmp/myapplication/git-ssh.sh on MYIP_ADDRESS
INFO [cdf243ea] Finished in 0.098 seconds with exit status 0 (successful).
INFO [984338f6] Running /usr/bin/env mkdir -p /tmp/myapplication/ on MYIP_ADDRESS
INFO [984338f6] Finished in 0.113 seconds with exit status 0 (successful).
INFO Uploading /tmp/myapplication/git-ssh.sh 100.0%
INFO [f3b4707c] Running /usr/bin/env chmod +x /tmp/myapplication/git-ssh.sh on MYIP_ADDRESS
INFO [f3b4707c] Finished in 0.101 seconds with exit status 0 (successful).
INFO [28cbffb2] Running /usr/bin/env mkdir -pv /containers/30025/sites/myapplication/shared /containers/30025/sites/myapplication/releases on MYIP_ADDRESS
INFO [28cbffb2] Finished in 0.147 seconds with exit status 0 (successful).
INFO [dec3eba0] Running /usr/bin/env mkdir -pv /containers/30025/sites/myapplication/shared/content/uploads on 148.251.3.181
INFO [dec3eba0] Finished in 0.102 seconds with exit status 0 (successful).
INFO [875c0694] Running /usr/bin/env mkdir -pv /containers/30025/sites/myapplication/shared /containers/30025/sites/myapplication/shared on MYIP_ADDRESS
INFO [875c0694] Finished in 0.104 seconds with exit status 0 (successful).
INFO [59829d7b] Running /usr/bin/env touch /containers/30025/sites/myapplication/shared/wp-config.php on MYIP_ADDRESS
INFO [59829d7b] Finished in 0.101 seconds with exit status 0 (successful).
INFO [1892d55e] Running /usr/bin/env touch /containers/30025/sites/myapplication/shared/.htaccess on MYIP_ADDRESS
INFO [1892d55e] Finished in 0.091 seconds with exit status 0 (successful).
INFO The repository mirror is at /containers/30025/sites/myapplication/repo
INFO The repository mirror is at /containers/30025/sites/myapplication/repo
cap aborted!
cd /containers/30025/sites/myapplication/repo && git rev-parse --short HEAD stdout: Nothing written
cd /containers/30025/sites/myapplication/repo && git rev-parse --short HEAD stderr: Nothing written
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/sshkit-1.3.0/lib/sshkit/command.rb:94:in `exit_status='
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:142:in `block (4 levels) in _execute'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/channel.rb:551:in `call'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/channel.rb:551:in `do_request'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:561:in `channel_request'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:221:in `preprocess'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:205:in `process'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `block in loop'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `loop'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `loop'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/channel.rb:269:in `wait'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:164:in `block (2 levels) in _execute'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/channel.rb:514:in `call'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/channel.rb:514:in `do_open_confirmation'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:545:in `channel_open_confirmation'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:221:in `preprocess'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:205:in `process'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `block in loop'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `loop'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/net-ssh-2.8.0/lib/net/ssh/connection/session.rb:169:in `loop'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:166:in `block in _execute'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:123:in `tap'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:123:in `_execute'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:76:in `capture'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/capistrano-3.1.0/lib/capistrano/dsl.rb:59:in `fetch_revision'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/capistrano-3.1.0/lib/capistrano/dsl.rb:30:in `capturing_revisions'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/capistrano-3.1.0/lib/capistrano/tasks/git.rake:52:in `block (4 levels) in <top (required)>'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/sshkit-1.3.0/lib/sshkit/backends/abstract.rb:81:in `within'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/capistrano-3.1.0/lib/capistrano/tasks/git.rake:51:in `block (3 levels) in <top (required)>'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/sshkit-1.3.0/lib/sshkit/backends/netssh.rb:54:in `run'
/home/mattia/.rvm/gems/ruby-2.0.0-p598/gems/sshkit-1.3.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => git:create_release => git:update
(See full trace by running task with --trace)
The deploy has failed with an error: #<SSHKit::Command::Failed: cd /containers/30025/sites/myapplication/repo && git rev-parse --short HEAD stdout: Nothing written
cd /containers/30025/sites/myapplication/repo && git rev-parse --short HEAD stderr: Nothing written
I previously pushed the repository by doing "git push origin master". This is the configuration:
deploy.rb
set :repo_url, "30025@MYIP_ADDRESS:/containers/30025/gitrepository/myapplication.git"
production.rb
set :deploy_to, "/containers/30025/sites/myapplication"
He did set up "repo" and other folders under /containers/30025/sites/myapplication but it seems it's not able to copy the git repository.
Any idea?
After running wp:setup:remote
, I'm missing the themes and plugins folders in production's shared
folder. cap production deploy
doesn't generate them either.
However, the uploads
folder is there, and syncing the uploads folder works. I've checked that the two folders are committed in the remote repository, and that they are not included in the .wpignore
file. The permissions on all the folders in production seem to be fine as they are all owned by the same deploy user.
My local environment is working fine with them being located in the content
folder. It seems that everything else is okay besides the two folders not being pulled from the repo.
After running wp:setup:remote
, I defined additional constants in my wp-config template file. Running cap production deploy
doesn't push the changes.
First, I tried to update WP locally by "bundle exec cap local wp:core:update"
but this fails with:
Stage not set, please call something such as cap production deploy, where production is a stage you have defined.
No worries, I'll update WP locally the old-skool way (via the WP backend).
Then, I update my production server via bundle exec cap production wp:core:update
. And this completes successfully but then advises me:
WordPress submodule is now at the latest version. You should now commit your changes.
Ok, not sure what that means, do I ssh in and commit from there? Doesn't make a huge amount of sense if that's the case. I'll just ignore that and deploy and hope for the best. However, this fails with:
fatal: reference is not a tree: 842221094a5011886291b21fd7c705835d69e0bc
Unable to checkout '842221094a5011886291b21fd7c705835d69e0bc' in submodule path 'wordpress'
What did I do wrong?
In lib/capistrano/submodule_strategy.rb, I needed to add " " on line 32 around .git* to get deployment to work. Otherwise it failed every time on the rsync.
I'm not sure what made my environment different.
I've been trying to set up Wp-deploy for some time and failed. While the deployment and db migration tasks seem to be working properly, I am not able to access the Wordpress site on my staging server. The site is looking for its themes in the 'content' folder as expected. Why then themes and plugins are isntalled in wordpress/wp-conent instead of the desired 'content' directory?
Also, when setting Wp-deploy up, am I supposed to install wordpress manually on the staging server. Ir do I install manually locally, and push the code base and db to the remote server without first installing wordpress therough the famous 5-min install?
Thank you!
Is there a way to specify the port so that it doesn't use 22?
DEBUG [8c7b243b] Cloning into 'wordpress'...
DEBUG [8c7b243b] Warning: Permanently added the RSA host key for IP address '192.30.252.128' to the list of known hosts.
DEBUG [8c7b243b] Permission denied (publickey).
DEBUG [8c7b243b] fatal: Could not read from remote repository.
DEBUG [8c7b243b]
DEBUG [8c7b243b] Please make sure you have the correct access rights
DEBUG [8c7b243b] and the repository exists.
DEBUG [8c7b243b] Clone of '[email protected]:WordPress/WordPress.git' into submodule path 'wordpress' failed
I have set everything up the way on the readme, but when I try to setup the environment , it runs but I have no idea what it's doing....
Here's the Log.
bobbyyang@bobbywebdev:~/wp-deploy$ bundle exec cap production wp:setup:both
INFO [4ce64aab] Running /usr/bin/env mkdir -p /tmp/wp-deploy/ on 191.239.40.71
INFO [4ce64aab] Finished in 1.765 seconds with exit status 0 (successful).
INFO Uploading /tmp/wp-deploy/git-ssh.sh 100.0%
INFO [fc114621] Running /usr/bin/env chmod +x /tmp/wp-deploy/git-ssh.sh on 191.239.40.71
INFO [fc114621] Finished in 0.237 seconds with exit status 0 (successful).
INFO [15c5c89a] Running /usr/bin/env mkdir -p /tmp/wp-deploy/ on 191.239.40.71
INFO [15c5c89a] Finished in 0.230 seconds with exit status 0 (successful).
INFO Uploading /tmp/wp-deploy/git-ssh.sh 100.0%
INFO [b75892d4] Running /usr/bin/env chmod +x /tmp/wp-deploy/git-ssh.sh on 191.239.40.71
INFO [b75892d4] Finished in 0.228 seconds with exit status 0 (successful).
I'm getting this message when trying to deploy. A quick search tells me that updating SSHkit solves that problem. However when using SSHkit 1.5 or 1.6 I'm getting a whole new set of errors.
Any ideas on how I could fix that?
As far as I can tell the database.yml
file is only used once when setting up a WordPress installation. After that it is an unneeded file that, together with `database.example.yml, only clutters the config directory.
The process of installing WordPress is now as follows:
Sep 1, 2 and 4 seem kinda superfluous to me. Maybe instead of using a file, the task could just prompt the user for the database credentials on the command line, using Capistrano ask
. In most cases, it's a one-time action anyway.
As I am doing ;)
It's a fairly simple fix, I'll send a PR.
I'm trying to use $ bundle exec cap production wp:setup:remote
to setup however it fails with the follow error:
fatal: destination path 'var/www/example.com/public_html/repo' already exists and is not an empty directory.
Oddly it creates a cloned file path inside of public_html, so the file structure end up looking like this:
Not sure what's going wrong so any pointers would be great.
I guess that rewrite rule in .htaccess.erb template should point to /wordpress folder. Otherwise would wordpress
end up in your url.
RewriteRule ^$ wordpress/index.php [L]
I've spoken at length with Rackspace and the current expire headers for text/html is set at 0 seconds. We need to change this in the framework so all new sites created now set this value at 1 week to allow Varnish to work. I have already edited (manually) all Live sites on derwent-01, windermere-01, southtees-01, nlag-01 and northtees-01. I've not changed the staging grasmere-01 server as I feel for staging sites it may be wise to leave it as it is.
Can you please change this so when we run set-up:remote on production it creates the .htaccess file with the following;
ExpiresByType text/html "access plus 1 week"
Previously it was;
ExpiresByType text/html "access plus 0 seconds"
Integrate Capistrano deployments to Slack.
On the docs for setting up staging.rb/production.rb it says server "xxx.xxx.xxx.xxx". I put a subdomain in here rather than the IP, which didn't work.
It took me a while to figure it out but the reason is that Cap prepends 'http://' to server so to use a subdomain you must write it as 'sub.domain.com' rather than 'http://sub.domain.com'. I think its worth noting this so others don't make the same mistake.
Due to cache now working on production servers (and the fact it's set at 1 week) I think it's sensible to build in a "restart varnish" command when deploying to the live servers.
Hi, I've worked through your instructions and the step to initialize the remote server is not working.
When I run this: bundle exec cap production wp:setup:remote
This is the output. Nothing is added to the remote directory.
INFO [65d30f66] Running /usr/bin/env mkdir -p /tmp/wp-deploy/ on [xx].com
INFO [65d30f66] Finished in 1.423 seconds with exit status 0 (successful).
INFO Uploading /tmp/wp-deploy/git-ssh.sh 100.0%
INFO [4ed2def1] Running /usr/bin/env chmod +x /tmp/wp-deploy/git-ssh.sh on [xx].com
INFO [4ed2def1] Finished in 0.203 seconds with exit status 0 (successful).
INFO [e05ad8c4] Running /usr/bin/env mkdir -p /tmp/wp-deploy/ on [xx].com
INFO [e05ad8c4] Finished in 0.213 seconds with exit status 0 (successful).
INFO Uploading /tmp/wp-deploy/git-ssh.sh 100.0%
INFO [0dff2724] Running /usr/bin/env chmod +x /tmp/wp-deploy/git-ssh.sh on [xx].com
INFO [0dff2724] Finished in 0.207 seconds with exit status 0 (successful).
It seems there is an issue with the version of Capistrano one runs when using wp-deploy
. I am currently on 3.2.1
. I was mucking around and ran the following command from within my project folder (/var/www/if_2
):
cap staging git:check
which then returned the following error:
cap aborted!
Capfile locked at 3.1.0, but 3.2.1 is loaded
Being somewhat puzzled by this error I went Googling and found the following solution after which things worked.
I noticed too in the Gemfile.lock
there is also a reference to the capistrano version within the specs:
directive:
GEM
remote: https://rubygems.org/
specs:
capistrano (3.1.0)
...
Instead of fixed at a particular version, should this not rather be?:
capistrano (>= 3.1.0)
The uploads:sync
command was only designed to really be used to sync between any missing files on either remote or local environments. This creates a problem when optimising images as both rsync command will be run (essentially pushing and pulling), where the larger file size of the two versions will be chosen.
As a proposed solution, we create an uploads:push
and uploads:pull
. Will create a pull request soon for that.
I'm trying to push my local DB onto my remote testing server but having no success.
bundle exec cap dev db:push
INFO [2e4a0d11] Running /usr/bin/env mkdir -p /home/mountyeti/dev.mountyeti.com/shared/db_backups on mountyeti.com
DEBUG [2e4a0d11] Command: /usr/bin/env mkdir -p /home/mountyeti/dev.mountyeti.com/shared/db_backups
INFO [2e4a0d11] Finished in 1.997 seconds with exit status 0 (successful).
INFO [3a99de56] Running /usr/bin/env mkdir -p db_backups on
DEBUG [3a99de56] Command: /usr/bin/env mkdir -p db_backups
INFO [3a99de56] Finished in 0.003 seconds with exit status 0 (successful).
INFO [b82b1b81] Running /usr/bin/env wp db export db_backups/2014102613845.sql --add-drop-table on
DEBUG [b82b1b81] Command: /usr/bin/env wp db export db_backups/2014102613845.sql --add-drop-table
cap aborted!
wp stdout: Nothing written
wp stderr: mysqldump: Got error: 2003: Can't connect to MySQL server on 'localhost' (61) when trying to connect
When I SSH into the server and run the command
/usr/bin/env wp db export db_backups/2014102613845.sql --add-drop-table
I get the following error
cd shared/
[beehive]$ /usr/bin/env wp db export db_backups/2014102613845.sql --add-drop-table
Error: This does not seem to be a WordPress install.
Pass --path=`path/to/wordpress` or run `wp core download`.
My server environment has git 1.7.1 so git checkout -B branch
doesn't really work. I thought I found a solution but my code is pulling the commit it first pulled, not the latest. Doesn't git branch -f branch
essentially do the same thing?
Here's what I have in the submodule_strategy.rb:
# put the working tree in a release-branch,
# make sure the submodules are up-to-date
# and copy everything to the release path
def release
release_branch = fetch(:release_branch, File.basename(release_path))
git :branch, '-f', release_branch, # changed for git 1.7.1
fetch(:remote_branch, "origin/#{fetch(:branch)}")
git :submodule, :update, '--init'
context.execute "rsync -ar --filter=':- .wpignore' --exclude=.git\* #{repo_path}/ #{release_path}"
end
end
I'm following your instructions line by line, and after setting up all the config files and running: bundle exec cap production wp:setup:remote
I don't feel the setup goes as expected. Nothing happens unless i actually run bundle exec cap production wp:setup:local
, and then that's the wp-config file gets created.
Whenever I run bundle exec cap production deploy
, the only thing that gets copied to the production server is shared > db_backups. It just seems like it's not pushing the files to the server?
I'm not not getting any errors, but something seems wrong unless I'm just clueless. (Afterall, I'm brand new to Capistrano).
Any clues?
INFO [9150a91b] Running /usr/bin/env mkdir -p /tmp/wp-deploy/ on myserver.com
INFO [9150a91b] Finished in 1.007 seconds with exit status 0 (successful).
INFO Uploading /tmp/wp-deploy/git-ssh.sh 100.0%
INFO [775122a3] Running /usr/bin/env chmod +x /tmp/wp-deploy/git-ssh.sh on myserver.com
INFO [775122a3] Finished in 0.138 seconds with exit status 0 (successful).
INFO [160577a5] Running /usr/bin/env mkdir -p /tmp/wp-deploy/ on myserver.com
INFO [160577a5] Finished in 0.137 seconds with exit status 0 (successful).
INFO Uploading /tmp/wp-deploy/git-ssh.sh 100.0%
INFO [bbcfd1a1] Running /usr/bin/env chmod +x /tmp/wp-deploy/git-ssh.sh on myserver.com
INFO [bbcfd1a1] Finished in 0.143 seconds with exit status 0 (successful).
Joes-MacBook-Pro:www.wp-deploy.dev zumajoe$ bundle exec cap production deploy
INFO [066528cd] Running /usr/bin/env mkdir -p /tmp/wp-deploy/ on myserver.com
INFO [066528cd] Finished in 0.911 seconds with exit status 0 (successful).
INFO Uploading /tmp/wp-deploy/git-ssh.sh 100.0%
INFO [fbd354ce] Running /usr/bin/env chmod +x /tmp/wp-deploy/git-ssh.sh on myserver.com
INFO [fbd354ce] Finished in 0.152 seconds with exit status 0 (successful).
INFO [d5d7531b] Running /usr/bin/env mkdir -p /tmp/wp-deploy/ on myserver.com
INFO [d5d7531b] Finished in 0.140 seconds with exit status 0 (successful).
INFO Uploading /tmp/wp-deploy/git-ssh.sh 100.0%
INFO [48803d63] Running /usr/bin/env chmod +x /tmp/wp-deploy/git-ssh.sh on myserver.com
INFO [48803d63] Finished in 0.134 seconds with exit status 0 (successful).
W3 tells me among other things to add a nginx.conf file (I'm running nginx) at /var/www/website/releases/20140630003109 (the current revision), and edit an .htaccess file that's already been generated.
I was wondering if there was a best practice to handle w3 before potentially reinventing the wheel.
Firstly, thanks for this great framework!
Quick description of my setup:
set :wp_localurl, "http://192.168.1.193/if_2"
$ bundle exec cap production wp:setup:local
Naturally I SSH from my Linux Mint host into my VirtualBox Ubuntu 12.04.4 guest and run all the necessary commands.
I have run through the wp-deploy installation process a number of times with WP v3.9 and each time I run
wp theme path
in the root of my site (/var/www/if_2 in this instance) the result is always
/themes
This is what is contained within /var/www/if_2
.
├── -
├── Capfile
├── config
│ ├── database.yml
│ ├── deploy
│ │ └── production.rb
│ ├── deploy.rb
│ ├── prepare.sh
│ └── templates
│ └── wp-config.php.erb
├── content
│ ├── plugins
│ └── themes
│ └── twentyfourteen
├── Gemfile
├── Gemfile.lock
├── index.php
├── lib
│ └── capistrano
│ ├── submodule_strategy.rb
│ └── tasks
├── LICENSE.md
├── readme.md
├── wordpress
│ └── ...usual wp files...
└── wp-config.php
I figured out the problem is in the generated wp-config.php file. If I change the line
define('WP_CONTENT_DIR', realpath($_SERVER['DOCUMENT_ROOT'] . '/content'));
to something like this
define('WP_CONTENT_DIR', '/var/www/if_2/content');
then all is fine and dandy. Running
wp theme path
now produces
/var/www/if_2/content/themes
as expected.
Are you seeing similar problems?
Add support for composer please i would love to but i have zero idea how
I upgraded WordPress to 4.1.1 on a new install of WordPress and now wpdeploy only works if I copy the themes and plugins into the wp-content directory instead of the desired content directory. Please kindly assist or give guidance or does WPDeply work with WordPress 4.1.1?
Thank you
I am using Bluehost and I am trying to use wp-deploy. I configured everything and when execute
bundle exec cap staging wp:setup:remote
I get:
[f940aef6] Command: cd /home1/webdevea/public_html/staging/releases/20141203090208 && /usr/bin/env wp core install --url='http://staging.myhousehold.co' --title='WebDevEasy' --admin_user='naorye' --admin_password='jNdIqdBwVhyuoRXOhd' --admin_email='[email protected]'
DEBUG [f940aef6] /usr/bin/env: wp
DEBUG [f940aef6] : No such file or directory
What is the problem?
Can the submodule_strategy be changed to git branch -f .. git checkout to allow wp-deploy to work with the stock git package on CentOS/RHEL?
I know that CentOS/RHEL 6.6 is the latest 6.x version but I think some environments are still locked down to 6.4. They both use git 1.7.1 though.
Thanks
When i try to push the repo to my server i get this:
Counting objects: 40, done. Delta compression using up to 4 threads. Compressing objects: 100% (37/37), done. Writing objects: 100% (40/40), 14.14 KiB | 0 bytes/s, done. Total 40 (delta 6), reused 0 (delta 0) remote: /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/spec_set.rb:92:in
block in materialize': Could not find rake-10.3.2 in any of the sources (Bundler::GemNotFound)
remote: from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/spec_set.rb:85:in map!' remote: from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/spec_set.rb:85:in
materialize'
remote: from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/definition.rb:132:in specs' remote: from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/definition.rb:177:in
specs_for'
remote: from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/definition.rb:166:in requested_specs' remote: from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/environment.rb:18:in
requested_specs'
remote: from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:13:in setup' remote: from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler.rb:122:in
setup'
remote: from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/setup.rb:17:in <top (required)>' remote: from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
require'
remote: from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' To https://gitlitio.us/nanashiRei/new-project.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://gitlitio.us/nanashiRei/new-project.git'
I have no idea what that means.
Hi there,
I am running into an issue when i am trying to deploy Wordpress on my shared host. I do have ssh access and the log says following:
DEBUG [0a757712] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/home/user/tmp/wpdeploy/git-ssh.sh /usr/bin/env git ls-remote [email protected]:bitbucketuser/wpdeploy.git )
DEBUG [0a757712] fatal: failed to stat '/home/user/..': Permission denied
DEBUG [0a757712] Finished in 0.049 seconds with exit status 128 (failed).
Maybe you have an idea, what the problem could be.
Best,
Daniel
Hi, great tool.
I am trying to use it but every time I execute bundle exec cap staging wp:setup:local
I get this
cap aborted!
wp stdout: Nothing written
wp stderr: Error:
<h1>Error establishing a database connection</h1>
<p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>localhost</code>. This could mean your host's database server is down.</p>
<ul>
<li>Are you sure you have the correct username and password?</li>
<li>Are you sure that you have typed the correct hostname?</li>
<li>Are you sure that the database server is running?</li>
</ul>
<p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='https://wordpress.org/support/'>WordPress Support Forums</a>.</p>
/home/hkr/Desarrollo/ElBaulDelProgramador/blog/lib/capistrano/tasks/wp.cap:106:in `block (4 levels) in <top (required)>'
/home/hkr/Desarrollo/ElBaulDelProgramador/blog/lib/capistrano/tasks/wp.cap:83:in `block (3 levels) in <top (required)>'
Tasks: TOP => wp:setup:local
(See full trace by running task with --trace)
I do not know why. After that, I executed bundle exec cap staging deploy
and the project deploy correctly, but I can not access the local site. Even if I manually put wp-config under the wordpress directory.
I am Using XAMMP for my local environment.
Hey there,
Thanks a lot for this deployment script, as I read through the readme it sounds awesome! I followed the Readme step by step (in fact twice, as I thought I might have missed something in the readme) but I only get the git-ssh.sh file uploaded and nothing more happens on each task. Here some sample output:
~/project-deploy on master*
$ bundle exec cap staging wp:setup:remote --verbose
INFO [29da352c] Running /usr/bin/env mkdir -p /tmp/project/ on 212.227.97.XXX
INFO [29da352c] Finished in 0.679 seconds with exit status 0 (successful).
INFO Uploading /tmp/project/git-ssh.sh 100.0%
INFO [263c22b2] Running /usr/bin/env chmod +x /tmp/project/git-ssh.sh on 212.227.97.XXX
INFO [263c22b2] Finished in 0.096 seconds with exit status 0 (successful).
INFO [5287ba77] Running /usr/bin/env mkdir -p /tmp/project/ on 212.227.97.XXX
INFO [5287ba77] Finished in 0.097 seconds with exit status 0 (successful).
INFO Uploading /tmp/project/git-ssh.sh 100.0%
INFO [4c5b504b] Running /usr/bin/env chmod +x /tmp/project/git-ssh.sh on 212.227.97.XXX
INFO [4c5b504b] Finished in 0.096 seconds with exit status 0 (successful).
~/project-deploy on master*
$ bundle exec cap staging deploy
INFO [43acbb86] Running /usr/bin/env mkdir -p /tmp/project/ on 212.227.97.XXX
INFO [43acbb86] Finished in 0.673 seconds with exit status 0 (successful).
INFO Uploading /tmp/project/git-ssh.sh 100.0%
INFO [16715b4b] Running /usr/bin/env chmod +x /tmp/project/git-ssh.sh on 212.227.97.XXX
INFO [16715b4b] Finished in 0.097 seconds with exit status 0 (successful).
INFO [4f00dc47] Running /usr/bin/env mkdir -p /tmp/project/ on 212.227.97.XXX
INFO [4f00dc47] Finished in 0.095 seconds with exit status 0 (successful).
INFO Uploading /tmp/project/git-ssh.sh 100.0%
INFO [9a5c34ef] Running /usr/bin/env chmod +x /tmp/project/git-ssh.sh on 212.227.97.XXX
INFO [9a5c34ef] Finished in 0.101 seconds with exit status 0 (successful).
Everything exits fine, so I just don't know how to debug this error. Thanks in advance for your help!
P.S.: Would you be so kind to add some documentation on how to do a database migration? I really don't understand where the source comes from. 😕
Hi,
I'm having an issue with the command bundle exec cap production wp:setup:remote
Everything seems to be working untill it tries to install wordpress. I have wp-cli installed on my system and the server. It's spitting out ths error:
DEBUG [8ac36f3c] Command: cd /path_to_/production.chasefarthing.com/releases/20140606044724 && /usr/bin/env wp core install --url='http://production.chasefarthing.com' --title='WP Deploy' --admin_user='user' --admin_password='password' --admin_email='[email protected]'
DEBUG [8ac36f3c] Error: This does not seem to be a WordPress install.
DEBUG [8ac36f3c] Pass --path=`path/to/wordpress` or run `wp core download`.
If I run the wp core install command on the server it doesn't work unless I'm in the wordpress folder inside that release. I'm fairly new to this so any help in pointing me in the right direction would be much appreciated.
I'm sorry to post this question here but I've attempted to research this everywhere else with no answer. I'm attempting to deploy to a shared hosting account and seem to be running into some issues. I get no errors back but yet I'm not seeing any folders created on the server nor does the DB:PUSH seem to work. Was just making sure if this will work with shared hosting accounts.
Thanks
The latest tag is not always the latest version of wordpress. Currently at the time of writing is not 3.9.2 (the latest version) and so the wp:core:update is not keeping wordpress up to date. Perhaps you can get repo by release number rather than latest tag?
I'm not a Ruby expert, but it seems to me that it would be really nice to have the Capistrano tasks in this framework bundled as a gem. This would make it easy to upgrade an existing project to a newer version if for example new tasks are added or existing tasks are updated.
Hi again, I've trying for a while to setting a default robots.txt, the default one is very simple, It would be great if the frameworks allow to customize a robots.txt in the same way wp-config.php and symlink it from shared/ to current/.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.