1

I'm used to a development workflow where I develop on a Local PC, and then push to a Remote Server. It works well for simple websites.

I'm a Wordpress newbie, so I could be wrong, but it seems that Wordpress is not meant to have such a workflow.

It seems that Wordpress expects the administrator to work directly on the Remote Server, and then create and download regular backups.

What is your preferred workflow?

1

There is nothing preventing you from developing locally with WordPress. I develop locally with WordPress every single day, both for professional projects and personal projects. You might need to do some research to find out what others do, and use that information to develop your own workflow.

Generally I use an *AMP application, like MAMP (Mac), when I need a "quick local setup," or a Vagrant box if I need the dev environment and production environment to match closely, it all depends on the client and project requirements. Code is committed to version control (typically Git, sometimes SVN depending on client requirements). Code can then be checked out on the production server from version control.

Some folks use a deployment system like Capistrano to handle pushing code to production, or even a simple bash script that automates deployment to production could be used. I know a few devs who like using a plugin like WP Migrate DB Pro for syncing the databases and media uploads. There's tons of information about how WordPress devs set up their preferred local dev environments and sync with production if you look around for it.

Here's a page from WPORG that might be a good starting point for you : https://developer.wordpress.org/themes/getting-started/setting-up-a-development-environment/#your%c2%a0wordpress-local-development-environment

  • Appreciate the answer. Does the version control system also take care of the database or is that needed to be done separately? – thanks_in_advance Mar 4 '15 at 18:48
  • Database would need to be handled separately. You could look into a tool like WP Migrate DB Pro : deliciousbrains.com/wp-migrate-db-pro, or the fork of that plugin called WP Sync DB : github.com/wp-sync-db/wp-sync-db – Richard Aber Mar 4 '15 at 19:09
  • Another option is to manually sync databases using WP-CLI if you have SSH access on both local and production. You could get a dump of the database with a command like wp db export, then copy the dump to the destination and import it there with wp db import, then run a search-replace if you have different URLs between local and production like wp search-replace 'http://example.dev' 'http://example.com' --recurse-objects. It all depends on your level of comfort with tasks of that nature. – Richard Aber Mar 4 '15 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.