Take the 2-minute tour ×

So I design and develop websites myself, mostly in WordPress. Once I'm happy with the site on my local server, I upload it and its database to the web server and let the client make whatever changes to the site. When he/she needs me to make changes to the code or the backend of WP, I usually work on the remote version of the site from then on, which is a pretty slow process compared to working locally.


Here's my typical workflow:

  • Set up local database
  • Code local WordPress site
  • Export local database
  • Import local database to remote server
  • Upload all files to remote server
  • Continue to make any changes post-launch remotely

Is there any way to improve my current workflow?

share|improve this question

migrated from stackoverflow.com Jul 25 '12 at 2:58

This question came from our site for professional and enthusiast programmers.

spent time to re-search supported version control system for wordpress and your hosting. –  Yusubov Jul 25 '12 at 3:08
add comment

2 Answers

If you have SSH access to your servers and if you're familiar with Linux shell commands, you can use Capistrano to automate your deployment process. It's an automated deployment tool built in Ruby and is widely used in many Ruby on Rails projects. Of course, this isn't limited to just Ruby on Rails. You can also use Capistrano for other Ruby frameworks, and other languages as well.

The typical steps that Capistrano takes are the following:

  • Gets access to your SVN/Git/Mercurial repository
  • Clones your project into the remote server
  • Does additional tasks according to what you want (Like importing the database)

This means that you have to incorporate version control into your workflow as well, which is actually good for since it makes your life easier. Capistrano supports SVN, Git, and Mercurial, so you can use whatever you prefer.

Another note, Capistrano is originally built for deploying Ruby on Rails projects, so you have to customize it to work on PHP. This article demonstrates how you can use Capistrano for your PHP projects.

share|improve this answer
add comment

git and svn/subversion are popular version control systems that can handle this. I would recommend git because it's now more widely used (it seems like everyone has a github these days). git allows you to choose which files you want to track and which you don't. In this case you would have two repositories, one remote and one local. When you make changes locally you can commit them and then push them to the remote server in a few commands. This will also track changes if your client ever decides they want to revert to a previous version or something goes wrong.

Also, vim is always my first suggestion for anyone wanting to improve workflow (or emacs if you're like that). If you get good at vim then you can often cut the man in the middle and develop remotely with great efficiency. Many editors also allow for remote editing. Vim coordinates well with git through the fugitive.vim plugin by Tim Pope. This streamlines git and vim efficiency.

There is also rsync which is what you're describing sounds like. It keeps directories, whether remote or local, in sync. It's relatively fast but doesn't have any version control options.

share|improve this answer
add comment

Your Answer

