Experiment On Your Blog Without Destroying It

Kabitzin on December 24, 2007 · in Blogging Tips

Most small tweaks to a blog can be done on the fly, but sometimes more drastic changes are called for. If you figure nothing will go wrong, and you can get the site back online in a short period of time, it’s usually easier to just throw up a splash page with Maintenance Mode. However, if it looks like it is going to be a while, you may want to consider playing on an offline version of your site. Although creating an offline version of your site requires some start-up effort, there are two very good reasons to put in that effort:

  1. The variable time cost will decrease greatly, since there are no files to upload.
  2. You can’t do lasting damage to your blog, since you are just working on a copy saved to your computer.

XAMPP

The first thing you will need to do is get XAMPP Lite. This basically runs a server on your computer, and the Lite version is very simple to set up. Installation is easy with the installer, and here are the general things you will need to know:

  • In the XAMPP control panel, you want to click Start for both Apache and MySql.
  • Browse to your main drive and find the Xampplite folder. There will be a subfolder called htdocs that you can copy your WordPress folder into. It may be worth making a shortcut on your desktop pointing to this folder.
  • If you drop your files in a subfolder called wordpress in the htdocs folder, then you can browse the local version of your webpage by typing either http://localhost/wordpress or http://127.0.0.1/wordpress in your browser’s location bar.
  • To enable rewrites for stuff like permalinks, you will need to find the httpd.conf file (Xampplite/apache/Conf) and open the file in a text editor. About line 166 you will find: #LoadModule rewrite_module modules/mod_rewrite.so and you can turn rewrites on by removing the # at the beginning.

WordPress and Your Database

If you are mostly working on design, it may not be worth going through the effort of importing real data. When I did the last redesign, I just did some copy-paste magic on a handful of old posts in order to see how the site would look. Whichever path you decide to take, there are very good tutorials in the WordPress Codex. There are also tutorials (with screenshots) for connecting XAMPP to your database here and here.

Download the latest version of WordPress, and unzip the files into the the subfolder you created in htdocs. Once your database is set up, you can install WordPress by browsing to http://localhost/wordpress/wp-admin/install.php (if you installed the files in a subfolder named wordpress). You can download and install all your favorite themes and plugins.

With your offline site all set up, you can play with all the site files without worrying about doing irreversible damage. Even better, your readers won’t realize that you are making changes behind the scenes, so when you’re done experimenting you can surprise everyone with an impressive and effortless update.

This post was written by...

– who has written 1970 posts on Sea Slugs! Anime Blog.

One of the founders of Sea Slugs, I handle most of the blog admin tasks while wearing my I AM BOSS shirt. I like my action series well choreographed, and my romance series extra trashy. I also have a soft spot for puns.

{ 6 comments… read them below or add one }

Totali December 24, 2007 at 2:00 am

For Mac there’s MAMP, which is what I use. It’s basically the same thing. Very useful, though I still don’t work behind the scenes on my blog that much yet.

Reply

Adun December 24, 2007 at 4:29 am

What I did for mine was create a sub-domain on my hosting and install WP and the necessary themes and edit the files that way. Of course uploading stuff does get annoying but hey, it works.

Reply

Kabitzin December 24, 2007 at 8:08 am

I’ve also tried using a sub-domain before, but it’s almost as much work as doing it with XAMPP, and the upload time starts to add up very quickly. There’s also more risk that you might mess something up on your actual site or your database while working on the sub-domain.

Reply

bateszi December 24, 2007 at 10:13 am

It’s funny you should post this now, given just yesterday I started coding a new WordPress theme for my blog on my localhost! I tend to install everything separately these days, so I just install Apache, then PHP, then MySQL and finally phpMyAdmin. Stay away from Microsoft’s IIS whatever the cost, it’s a horrible web server compared with something as smooth and well documented as Apache. I transferred my WordPress DB between servers using a .SQL file created by phpMyAdmin.

Anyway, the major problem I’ve faced so far is that I didn’t upgrade my WP for like 6-8 months and the latest versions are using UTF-8, so all my old posts are littered with funky characters :|

Reply

Kabitzin December 24, 2007 at 11:42 am

Ah, the UTF-8 issue. If you have a backup (not just the SQL output) of your database, you might be able to salvage the situation. I made two posts about my experiences converting my database to UTF-8, here and here.

Reply

Martin December 24, 2007 at 2:48 pm

I tried running SQL/Apache on my machine as a testing server a while back but thanks to my n00bishness I couldn’t get it to work correctly. This seems to be a handy alternative to going through the hassle of a full-blown testing server so if the holiday offers some spare time I might give it a spin. The idea of my own PC to act as a backup server during downtime sounds pretty neat, I must admit.

Reply

Leave a Comment

{ 3 trackbacks }

Previous post:

Next post: