Tag Info

Hot answers tagged

75

@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


11

I have a setup I'm pretty proud of, and it works extremely well for my team. General Structure I keep the entire installation under git. All changes, be it a system update, adding/updating a plugin, adding/updating a theme, go through the same workflow. Changes can be rolled back at a moment's notice. I have a deployment server (an old P4 desktop) running ...


9

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 ...


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.


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

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 ...


5

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 ...


3

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


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 ...


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.


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

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

One thought - when I go to www.example.com/staging/wp-admin it automatically redirects me to www.example.com/wp-admin Could the redirect from staging.example.com to example.com/staging be conflicting with the existing install? UPDATE: looks like it could be related to .htaccess issues and complicated domain references in the database From the WP Codex: ...


2

There is really only one way to do an easy transfer of domain or host that I have found. It works flawlessly for me on single and multisite installations. Export your database to a .sql file. ( I use PHPMyAdmin for this ) Create a new copy of the file to be edited with a slightly different name. Open the file in you preferred text editor> ( gedit for ...


2

First, I think its important to consider what you are going to Version Control . I would recommend against putting the entire WP directory under VC. I think it makes the most sense to put wp-content/themes/YourThemeName under VC. For a large site with a high number of complex plugins I could see the case to including wp-content/plugins as well. If you ...


2

I do this with git and mercurial, just make sure you're using a private repo. Option 1. The only problem is the config.php, which you can tell git to ignore on push or before init. Use .gitignore or git update-index --assume-unchanged config.php (read a bit about the assumed-unchanged command before using it) Options 2. Use a conditional in the ...


2

Well if you want to do this right, you would have one database for development, one for staging and then the live database. It's just that Wordpress is not designed to live with such commons in software engineering. The component I still see publicly missing is a complete migration script that is able to convert all wordpress settings and data in the ...


2

Upgrade to latest MU version first. If you run into problems with that, report your feedback and the bugs you encounter to the MU Project. Then Upgrade to WordPress 3.0. If you run into any problems with that step, report it to the WP Project. Update: As far as you're concerned for a quick test (not a mass test), you can do the test locally on a ...


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

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 ...


1

I just set up a dev.domain.com subdomain and mirror everything there, doing a find/replace on the sql export for www > dev, and of course changing wp-config. I used to have a staging server I mirrored things on, but I've since learned that a change in length of the domain name will invalidate any serialized data that contains it, so I now always keep the ...


1

In this situation, I'd recommend the following: Dump your production database into your test database Install WP 3 and point it at your test DB Run the database upgrade Turn users loose on the test instance We used a similar process on a much larger installation, and it worked fairly well. Having the second instance made it possible to use our testing ...


1

Hi @Davy8: It's a hard problem to solve. Would this answer be any more helpful? Easily Move a WordPress Install from Development to Production? I know it's not a perfect solution, but it is a start. P.S. I'm working with some others to solve the bigger problem with a plan to release as part of a GPL-licensed product. We are looking for people who ...


1

You might want to look at mysqldump. I haven't used it so I can't vouch for ease-of-use, but it's a mysql utility for copying DBs, and it has an "ignore-table" option that lets you skip tables. Another approach might be to copy the DB in full, but have a script that runs immediately after the backup that cleans out the post table.


1

There is no settled solution for change management in a WordPress environment. I recently wrote about one approach, that might be helpful. @scribu then brought our attention to this new 'Ramp' offering for content staging. which might be of interest, depending on your use case. @MikeSchinkel has his own potential solution which doesn't attempt to ...


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

@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/


1

Check out this search and replace plugin. The benefit of using an absolute URL is that you can easily find and replace it, either with the plugin linked above or an SQL statement or even using some built in WordPress API's. So I wouldn't do anything differently the next time. I used the search and replace plugin when I moved domains. Worked great. I would ...


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 ...



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