Manage your Wordpress development and live blog

I have basically three environments that I use to work on my main site. I have my local on my computer, as well as development and live on my web server. I developed the site using Wordpress in a local environment and I want everything to be updated via svn.

What would be the best way to do this since I need three WP installations in each environment? Since all the files will be exactly the same from the repository in all three environments, how do I handle various WP settings and configurations? Is there a way to copy the WP database from local to the other two and make small changes to fix URLs and other differences due to different domains?

Sorry if this is unclear, I will clarify as soon as I get the answers.

+4
source share
2 answers

Usually (if you are a good developer) the URLs are not hardcoded in any plugins or themes, and everything that depends on the root URL can be easily changed, for example:

update wp_options set option_value='http://live.wordpress.com/' where option_name in ('siteurl', 'home') 

The difficulty is updating the content, which may contain information about a specific domain (for example, if you copy-paste addresses for links from the address bar, etc.). But again, the solution is quite simple - go through the dump and replace ' http://dev.wordpress.com ' with http://live.wordpress.com . So moving the database is not as difficult as it seems;)

+1
source

Is it just the files you want to save or data, like in blogs and comments?

If you want to keep the actual content, you will also need backups of the life database. Otherwise, tracking Wordpress files is pretty simple. You just need to back up the files from any themes that you added or edited and the configuration file that Wordpress provides a copy anyway.

+1
source

All Articles