XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Installing Wordpress Offline

Installing WordPress Offline

Posted on 04. May, 2009 by .

At the beginning when I started blogging I didn’t know how to use WordPress correctly. I also didn’t have much experience with using WordPress.

Days after days I tried to play around with my WordPress theme but I always had to log into my WordPress blog. The problem was that it was not only slow to always change code in the Editor section, but it always changed the appearance of my blog.

This eventually led me to find a way to use WordPress offline. Using it offline has a lot of advantages:

  • you do not use up your bandwidth
  • it is a lot faster
  • it just changes your local theme and does not change the look of your online blog

There is just one problem with installing WordPress offline. You usually need a server to run WordPress as it uses PHP, which is a programming language that is used on most web servers.

After trying several things out I became aware of XAMPP which solves the issue mentioned above.

What Is XAMPP?

XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use – just download, extract and start.

XAMPP is really useful as it packages all the necessary files in one distribution and makes the installation very simple.

Now let’s look at the steps you need to take in order to get your offline WordPress blog working.

Download XAMPP

Go and visit Apache Friends to download XAMPP. There are several different downloads depending on your platform.

Installation

After having downloaded XAMPP, double click on the file (in Windows). This should open up a new Window and start the installation.

Default Installation Start

Default installation start page in Windows

Click Next to go to the next page. There you should be able to choose to which location you want to install XAMPP. If want to change the default location then click on Browse…

Choose the XAMPP installation location

Choose the directory to which you want to install XAMPP

Again choose the Next button to get to the next page. Here you are prompted with options such as whether to add an icon to your desktop or not. Select the options you like and then click on Install.

Afterwards your computer should start to install XAMPP. When it’s done just click on Finish to close the installation.

XAMPP should now be installed so let’s take a look at making it ready for WordPress.

Running XAMPP

If you chose to add an icon to your Desktop then just double click on it, otherwise go to Programs -> Apache Friends -> XAMPP -> XAMPP Control Panel. You should now see a control panel similar to the one below.

XAMPP control panel

XAMPP control panel

Click on the two Start buttons next to Apache and MySql to start both of these servers. Now open up a browser after the servers are started. Type in the address: http://localhost/. You should now see a different control panel for XAMPP.

XAMPP default browser page

XAMPP default browser page

XAMPP Security

In order to make XAMPP more secure go to http://localhost/security/xamppsecurity.php . There you can change XAMPP’s default passwords.

XAMPP Security

Change the default passwords

It is very important to change the default passwords!

Setting Up the Database

The next step to take is to go back to the XAMPP browser panel (http://localhost/). In the navigation bar search for phpMyAdmin and click on it. A page similar to the one below should appear.

phpMyAdmin login page

phpMyAdmin login page: Enter your username and password

Add your user name and password into the boxes and click on Go.

After logging in, you have to create a new database. Look at the MySQL localhost section at which there should be section for you to create a new database. Let’s call the new database wordpress. Instead of the default MySQL connection collation choose utf8_unicode_ci (all the way at the bottom), then hit Create.

Create a database named wordpress

Create a WordPress database

We now have created our WordPress database. All we now need to do is to download WordPress.

Install WordPress

After downloading WordPress go to the directory where you have installed XAMPP. Then click on the htdocs folder to switch to it. You now have to extract all the WordPress files into a subdirectory of htdocs. You can do this by creating a subdirectory (of htdocs) named wordpress. If you choose to use a different  subdirectory then you must adjust the blog path (http://localhost/wordpress/) at the end of the tutorial according to it.

Go to the wordpress directory and open up wp-config-sample.php in a text editor (Notepad will do just fine). You only need to change three lines, i.e. DB_NAME, DB_USER and DB_PASSWORD.

Change the default DB_NAME to wordpress, the database which we have created earlier. Then enter your phpMyAdmin username into DB_USER (the default is root) and also your password into DB_PASSWORD.

Change the default WordPress config settings

Change the default WordPress config settings

You don’t need to change DB_HOST since it is already set to the right host, i.e. localhost. Now you need to save the file as wp-config.php and you should be done setting up.

Before you can start though you probably need to go to http://localhost/wordpress/ (your blog address) and follow the default WordPress instructions to complete the WordPress installation.

You should then be able to visit your blog at http://localhost/wordpress/ and your Administration panel  at http://localhost/wordpress/wp-admin/ .

8 Responses to “Installing WordPress Offline”

  1. bill clinton

    28. Oct, 2009

    Thanks a lot !!! It’s working perfect after following the steps described above.

    Reply to this comment
  2. Swamykant

    13. Jul, 2010

    I have a problem with Apache .. The Apache is not starting at all.

    Reply to this comment
    • Julius

      16. Jul, 2010

      hmm what kind of problem is it? Does it just won’t start or does Apache doesn’t work at all? Have you installed it the way I mentioned it in this post?

      Reply to this comment
  3. Kole

    08. Aug, 2010

    how do you make your site go live again?

    Reply to this comment
    • Julius

      09. Aug, 2010

      Do you mean how you access your site? Or how you start the server? You can start the server by going to your XAMPP directory and there should be something like a control panel file. Double click on it and a control panel will open. Then simply start the Apache server and the MySQL server. I hope this helps

      Reply to this comment
  4. Swamykant

    08. Sep, 2010

    Thanks for the tips buddy ..

    Reply to this comment

Leave a Reply