Feed on

Why would you want to run a blog on your PC?

To experiment on it, test plug ins, and make modifications without bringing down your website!

A lot of people don’t realise that you can run Web-Applications on a PC as opposed to the Internet, from where you can modify and test your application before uploading changes to your live version (on your web server).

This applies to all applications, be they E-Commerce sites, Blogs or Content Management Systems.

Although any server side technology, such as Cold Fusion, JSP, ASP.NET, Python and PHP can be run on a desk top, I will confine this post to PHP, as that is what most people reading this will be using.

The first step in doing this is to find out what your web server is running. This is important as you will want your local PC to emulate this server as closely as possible. The reason being that different software versions behave very differently, for example, MySQL 5 is a lot stricter with its syntax than previous versions, and there are extensive differences between PHP versions.

A quick way of establishing what your server is running is to create a file such as “test.php” and into that file add a single line of code:

  • <?php phpinfo(); ?>

Put that file on your server, open it in your browser and it will reveal:

The version of PHP your server is running


The version of Apache your server is running:


And the version of the MySQL client you are running (which should closely match the mySQL server version.


It is really the mySQL server version you need to find, which you can find using phpMyAdmin or a similar tool on your server. Alternatively you can get this information from the command line using “mysql – v”, or just mail your host and ask them.

Once you know what your sever runs you want to try and get (if possible) the same versions of those applications for your PC. Getting the correct versions can be problematic, especially as a lot of older versions are available only as source code.

  • Get current versions of Apache (including windows installers) here
  • Get Apache archive versions (source only) here
  • Get mySQL here (get the GUI Tools MySQL Amin and MySQL Query Browser too)
  • Get PHP here

For Windows you really want to use the binaries which come with installers. Working with the source is a lot more problematic.

Installing the binaries on Windows is easy enough (they come with a Windows installer). The only problem is configuring PHP with Apache, which usually requires you to edit some configuration files, though the documentation is pretty good. You may get lucky and find that the installers are able to integrate the software for you, but I have to say, I have done this several times and have never ‘got lucky’ in this respect.

If you are comfortable messing around with XML config files and have some understanding of what it is you are trying to achieve, then you should be able to get it all working, at which point you can start installing your Web-Apps.

I have to say that I would not recommend installing this software on Windows, you are far better off using Linux, not least because your web-server is likely to use Linux. Again you should aim to match your local version with your web server.

There is a very easy to use version of Linux available (Ubuntu) which you can install and use freely on any PC. With Ubuntu, you can pretty well get this software to install itself automatically. You merely browse for the components you require, and click to install them. Configuration and integration between the applications is done automatically.

There is a lot to know on this subject, far more than I care to write, and getting everything working properly can result in a lot of hair pulling.

Really this post is just to make people aware that this can be done, and suggest they try it, particularly if you like playing with plug ins for your blog.

Related Posts

  • Rip Websites with HTTrack!
  • Firebug and Fire FTP for Firefox
  • Run PHP in WordPress Posts
  • Free Software Downloads
  • RSS feed


    Comment by coach

    I have recently done exactly what you suggest. Had an old box doing nothing and decided to put it to use. A couple of hours later had a server running fedora core and everything else needed to test as many blogging and CMS options as I like. Great for testing templates and getting to know a new system before recommending to a client.

    (Comments wont nest below this level)
    Comment by SiteLogic

    Yes its really for development, and as its very quick to copy files around on your PC (as opposed to FTP) you can backup, create different versions with ease.

    The only thing to watch is the versions of software you are using… PHP and MySQL versions are very different.

    (Comments wont nest below this level)
    Comment by Jon Lee

    May I suggest XAMPP lite. A complete apache/mysql/php server that can run without installation (even from a USB stick!)

    (Comments wont nest below this level)
    Comment by SiteLogic

    Ive read about this but not used it, its supposed to be more secure than running a local instance of apache (is it not??)

    I really should give it a go… I’m just in the habbit of trying to emulate the server…

    (Comments wont nest below this level)
    Comment by Moonaire

    I had php/mysql/apache installed in my win2k system. Since it’s windows, sendmail doesn’t work, so I’m still googling for alternatives.

    (Comments wont nest below this level)
    Comment by SiteLogic

    Ubuntu is the easiest Linux distro to use, I would recommend you start your search there. There are other variants such as Kubuntu using the KDE interface….

    (Comments wont nest below this level)
    Comment by AskaX

    yes XAMPP lite is the best for win user I think :D

    (Comments wont nest below this level)
    Comment by SiteLogic

    I am going to try that, Linux is the best option if you want to use Apache and MySQL to replicate a web server, but on windows it is more of a nuisance… I think this would be a better solution


    Sorry, the comment form is closed at this time.