Tag Info

Hot answers tagged

76

@Insanity5902: Deployment of a WordPress site from one box to another has been a PITA since day one I started working with WordPress. (Truth-be-told it was a PITA with Drupal for 2 years before I started with WordPress so the problem is certainly not exclusively with WordPress.) It bothered me that every time I needed to move a site I'd have to spend so ...


22

When possible, I set WP_HOME and WP_SITEURL in wp-config.php. This, combined with a database dump and import, is the most simple of all solutions I'm familiar with. http://codex.wordpress.org/Changing_The_Site_URL#Edit_wp-config.php


12

My favourite hack; add a setting to your /etc/hosts to make the production domain point to your development box, just on your machine. To deploy to production you rsync all the files and push the database over. The risks of this strategy are clear; you might confuse your development environment with your production environment. It still an easy fix ...


7

The reality is that what we want is this: http://www.liquibase.org/ Liquibase is an open source (Apache 2.0 Licensed), database-independent library for tracking, managing and applying database changes. It is built on a simple premise: All database changes are stored in a human readable yet trackable form and checked into source control. However ...


6

There may be a better way that I am missing but I am going to give you 2 options: 1.Use XML Export to export your new posts and comments. Then use the WordPress Importer to import the new posts and comments back into the dev database It's best to import into dev then move the database over to production because when you import it will download all the ...


6

WP Engine is a new service that offers "One-Click Staging": WPEngine has an exclusive feature called “staging.” Here’s how it works: Before you make a scary change to your blog, click the “snapshot” button. We make a complete copy of your blog and set it up in a separate, safe area. You can play with anything you want; nothing’s live. Only when you’re ...


6

I wanted something similar when I migrated to WP a few months back, so I wrote a pretty simple shell script that uses rsync and mysqldump over ssh: http://snarfed.org/sync_wordpress It's not sophisticated or web based, but I'm happy with it.


5

I am personally addressing this issue with my project on Github, called Autopress. I don't have a perfect solution yet, but I'm getting closer, especially with the wpstage plugin from the wpengine folks.


3

It's best to just log errors to the server and then use bash or a server script that supports email and error analysis (instead of PHP). There are lots of log file tools out there, simple ones like Logwatch, Swatch, Octopussy, or more complex ones like Nagios. For errors which are triggered using WP_Error you can write an email alert or log function right ...


3

You might take a look at a product from iThemes, called BackUpBuddy. I've only used it twice, each time had a hitch or two, but overall it looks promising.


3

This looks promising. We are working on some scripts to handle migrating some of the data, wp-options for example, changing paths in the db, a copying over media. The issue I have is that the live site continues to grow while the other is in development. One site we work on has 20 posts a day and over 3,000 comments per day. That is too much data to ...


3

Two Google Summer of Code projects that have a similar goal: Automatic Migration (GSoC 2010) WordPress Move (proposal) (GSoC 2011)


3

Duplicator Plugin: Here is a plugin that I have been working on. It's currently in beta but it gets the job done for most sites. Right now it is targeted at smaller WordPress installs. http://wordpress.org/extend/plugins/duplicator/ Resources: Additional resources for the plugin can be found here: http://lifeinthegrid.com/duplicator/ Community: Please ...


2

If it's just more of the exact same type of data (some new blog posts, new comments) I'm not sure why you need to sync it really. It's not like it will change the way the code on the site works since it's just more of the same. I typically don't worry about it unless it's a new type of data. I just always make sure I have a good sample of the data for the ...


2

You might be interested in this Q/A in the FAQ category: Easily Move a WordPress Install from Development to Production? Server mirroring/migration is a pain because there are so many pieces that might (or might not) need to be synced. PHP code (core, plugins, themes) is easy enough to keep straight. But when it comes to data, it gets messier. You've got ...


2

I use subversion's export command to install the WordPress files (http://core.svn.wordpress.org/tags//) as well as all plugins in the repository (http://plugins.svn.wordpress.org//tags//), then just zip the theme and custom plugins and install them normally. Once all of that is up and running without content, I export the test DB and do a search/replace for ...


2

Normally I login to phpMyadmin upload the database and edit the contents of wp_options>siteurl and wp_options>home to the expected domain. If you need to update URLs within your posts and pages content you can do a search/replace for the URL and the media/uploads path on the .SQL file prior to uploading. It's a quick job.


1

I would be very hesitant in having the same database for staging and live as any changes to the database would affect both sites (especially when using software like Wordpress where there is configuration in the database). The only time that I would think of pointing to the live database would be if I was doing theme development and was not going to change ...


1

since I run my sites in IIS (I also run asp.net, so I need windows) I use WebPI from Msft to install a new instance, then I copy the template and use the import/export to transfer the data. It's not perfect but the whole thing takes less than an hour. Obviously it would be nice to have a one-click solution, but this is what I found to be easiest for me.


1

Another paying solution: the Xtreme One theme framework released version 1.2 with Xtreme Backup which allows you to "export or import the settings of your Childthemes, Layouts or Widgets with all their settings/content as XML file."


1

As soon as you touch the topic of doing changes in parallel you touch the area of configuration management. With lots of patterns, own communities (http://www.cmcrossroads.com/) and tools not so much for version management (as svn/git) but for support of configuration management (patterns) like clearcase. (totally different areas). In this case it is still ...


1

there are quite a few threads on here about this topic ... just look at these examples: Database synchronization between dev/staging and production I would also recommend you read Mark Jaquith's post on Local and Dev Tip's.


1

I have been using a plug-in (Backup Buddy) to achieve my transfers. It is not free but it does a great job of moving the from a dev (local) server to a live site. http://pluginbuddy.com/purchase/backupbuddy/ Back up your entire WordPress installation. Widgets, themes, plugins, files and SQL database - the entire package! Just like your laptop or ...


1

RAMP is a new content deployment plugin from Crowd Favorite, and it looks really slick. It's $250, though, so I haven't tried it out yet. Might just pay for itself in the amount of time saved, though, so I'm considering it. The big benefit that it has over most of the other methods mentioned, is that it can intelligently merge posts, comments, etc. It's not ...


1

99.99% chance that you configure wordpress with wrong database details. make sure you are using correct database details in wp-config.php file /** The name of the database for WordPress */ define('DB_NAME', 'database_name_here'); /** MySQL database username */ define('DB_USER', 'username_here'); /** MySQL database password */ define('DB_PASSWORD', ...


1

If you never send/sync Production posts to live. Then just pull/copy the live database to the development database via mysqldump (or similar) and use wp-config vars to force the site and blog URL. Use the following in the dev versions wp-config.php to force the URL's define('WP_HOME','http://example.com'); define('WP_SITEURL', 'http://example.com'); You ...


1

While there's no shortage of good solutions here, in the spirit of sharing I thought I would add my bash deploy script to the pile: https://github.com/jplew/SyncDB SyncDB is bash deploy script meant to take the tedium out of synchronizing local and remote versions of a Wordpress site. It allows developers working in a local environment (eg. MAMP) to ...


1

Best Practice #1 One of the best practices is to let the PHP process to run under a different user (in your case: jdoe, jsmith, etc) than the web server user (in your case: httpd) and let only these users have the write permission. Of course, your web server may still need read permission for all these files. For this solution to work, you may need to go ...


1

I've been using http://wordpress.org/plugins/wp-clone-by-wp-academy/. It works nicely! Just 3 steps: Install the plugin on both sites. Use the plugin to generate a backup on the old site. Take the backup URL it gives you and plug it into the plugin page on the new site, hit go, and your migration is complete in just a few seconds! It adjusts all the ...


1

@Blockhead, You also might want to check out DeployMint which only works on WordPress Multisite - but could be the best solution for what you are looking for. http://markmaunder.com/2011/08/19/deploymint-a-staging-and-deployment-system-for-wordpress/



Only top voted, non community-wiki answers of a minimum length are eligible