WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to have WordPress on my local OS X machine to test out different themes, content, etc and then deploy it on to the production Linux server. I'm using WordPress for my website and blogging will be a secondary thing. What is the best way to do this? Please elaborate on the key steps to create it.

I googled around and people talk of using Git, capistrano, editing something to fix some links, some are just the simple blog type setup on server, etc... all sounded too complicated for the basic blog setup.

I would like to keep user comments when updating production website. Not too worried about loosing my content but would be nice if I didn't loose it.

share|improve this question

migrated from stackoverflow.com May 16 '11 at 5:36

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

Do you want your local version to mirror your live version in real time, or do you just want something to test out production and wanted the comments and content to stay so that you actually have content to test it out on? By the by, I'd look into perhaps increasing that accept rate. It's not shocking, but it's not great either. – DouglasMarken May 16 '11 at 4:35
We have some questions that deal with similar issues on this site: Easily Move a WordPress Install from Development to Production?, What process do you use for WordPress development?, or other questions in the "Related" column to the right. – Jan Fabry May 27 '11 at 20:12

See Codex for running a development copy of wordpress. You can make all the changes you want on the blog without affecting the production site by testing out new themes/etc which is what it seems like you're looking to do.


share|improve this answer
Although that is what they want. But they also want to mirror the content on the live site instead re downloading the en files – xLRDxREVENGEx May 27 '11 at 20:23

The only way I can think of is through a backup/migration protocol. Unfortunately both server's cannot point to the same DB because the site url and your widget/theme configurations are stored in the DB. So you still need two databases.

The secret sauce would just be how you migrate / copy. What you'll be doing is taking a "snapshot" of your production database and migrating it to your test box. You don't need to do this every time since you just need to have a "sampling" of the content from the live server. So backup your production database, migrate and deploy it to your development box, then do the same for your production files (the 'wordpress' directory and all its contents). Alternatively you may choose to just copy the 'wp-content' directory.

Mess around in your dev box to your heart's content. Install plugins, edit themes, edit any php inside wp-content.

When you're ready to deploy something to production, just make sure you don't migrate the database from dev to prod! You can migrate the FILES from wp-content pretty easily.

Do note that if you are trying a plugin or new theme, just migrating the files isn't enough: you still have to enable them in the back-end, since that's a database write operation.

If you DO want to migrate all your configuration changes, BE CAREFUL. Before backing up and migrating the wp_options table of your database on the dev server make sure you set your production server into RELOCATE mode, since the wp_options also contains the site url.

Hope this makes sense. I'm writing shorthand, so if you need more explanation of anything, just leave a comment.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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