blog how to, blog trick, blog tips, tutorial blog, blog hack

Minggu, 04 Januari 2009

Create a Copy of Your WordPress Installation

The good thing about open source software is that it is free. You can create a new WordPress blog in a few minutes, whenever and wherever you want it, with one of these scenarios:

  1. Install WordPress 2.7 in a directory under your existing blog. If your blog is hosted under example.com, it is possible to create another directory such as example.com/wp27 and make it as if it is another copy of example.com.
  2. Install WordPress 2.7 in a new domain. Just like the above scenario, but you can replicate the whole structure, even the directory under the domain, to match the main blog. Of course, the only difference in this backup blog is the domain name.
  3. Install WordPress 2.7 locally. There are a few ways to do this, either install it as a service running under your desktop operating system (Windows) using Apache or various alternative and lightweight web servers like nginx or lighttpd.

I’ve created an experimental WordPress virtual appliance called WP-Sandbox. It allows you to run a web server on a virtual machine quickly, using VMware Player. It is still in a very early stage of development. Currently, as of this writing, I have already spotted a few bugs so expect an upgrade soon.

Important: Rather than pointing the backup WordPress 2.7 installation to use existing database, you should backup your database and import it to a newly created database. If you have limited number of allowed database in your web hosting account, either install it locally or modify it to install in the same database but with a different prefix.

This upgrade of WordPress requires you to upgrade the database. By pointing it to a new / backup database, you avoid modifying the production data.

Don’t worry if you don’t understand what I’m talking about above. Just pick one that fits you well and go with it.

WP-DB-Backup is an excellent plugin for backing up a database. Follow the instructions at WordPress Codex for more alternatives, including using phpMyAdmin and straight MySQL commands.

Once you have the WordPress 2.7 code ready in the new location — including the edited configuration file (wp-config.php), export your existing data and import / restore it to the new database, you are ready for the next step.

I almost forget. Add the following lines to wp-config.php:

define('WP_HOME', 'http://example.com/wp27');
define('WP_SITEURL', 'http://example.com/wp27');

This saves you from modifying the database options.

0 komentar:

 

Powered by Klaten WEB.com