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

Minggu, 04 Januari 2009

Finalize installation on production server

After you’re satisfied with it, and most likely you will, you may want to do the upgrade process once again, but now targeting the production blog.

Here are some tips that let you minimize the down time. This method may not be suitable for everyone especially if your blog hosts a huge number of huge files but at the very least you can take some ideas and use them to make the migration process as smooth as possible.

  1. Extract or upload a copy of WordPress 2.7 to a new directory at the same level as the production blog. For instance, if your blog is at example.com/blog, extract a copy of WordPress 2.7 to example.com/wp27.
  2. Duplicate the whole data just like what you do in step 2 above. Use your favorite tool to do that, as long as it works for you. Most importantly, retain all the permissions of the files and directories so everything works after the migration process. Note that you don’t have to change the wp-config.php configuration variables like above because you want to upgrade your production database now. (You already have a backup copy of the database, right?)
  3. Double check if everything is already in place.
  4. Copy the directory of the production blog to something else, such as blog-2.6, and immediately after that, copy the wp27 directory to blog. If you are on Linux command line, you may do this on one line so it happens in a fraction of a second.
  5. Run the upgrade script, which is example.com/blog/wp-admin/upgrade.php, to continue with the above example. Follow the instructions on the screen and you are done.

Now perform extensive tests again on your production blog to make sure everything go smoothly.

If you have huge files that you don’t copy over from the old blog, now move them from the blog-2.6 directory to blog, which is now your WordPress 2.7 blog. WordPress 2.7 introduces a new contant NONCE_KEY in wp-config.php. For added security, you should complete all those keys if you haven’t. Replace the wp-config-sample.php to reflect your blog database and other parameters, and overwrite wp-config.php (backup first).

With the above method, notice that I didn’t take down the blog, put up maintenance message or use any plugin of that kind. Also if you have extra space to play with, this method is actually faster than replacing the WordPress files manually.

The second thing I want to bring up is that I didn’t deactivate any plugin at all. That process above works for me. If you want to ensure the process goes smoothly, follow the WordPress upgrade process (in the Codex, links above) to the letter and deactivate your plugins first before you upgrade. Note that you are responsible for your blog upgrade, even if you follow the steps above.

As of this writing, I just upgraded my blog at Blog Building University using this method. At the moment, I have 22 WordPress plugins installed on my blog. Not too many compared to others, but I’m impressed it works flawlessly.

The WordPress team is doing an awesome job there.

Enjoy your brand new WordPress 2.7!

(I remember a colleague from my last job seven years ago complained that I always leaved old files scattered. Perhaps he was right. You should clean up the old directory if you don’t need that anymore and delete the test database you’ve installed during the test.)

Hendry Lee helps bloggers overcome strategic and technological challenges in starting and growing their blogs. He is also an enthusiast about how to make money blogging and actively blogs in different niches. While you are there, download your free eBook and subscribe to the blogging e-course!

Follow Hendry on Twitter (@hendrylee).

0 komentar:

 

Powered by Klaten WEB.com