WordPress has been a blessing for those of us bloggers who wanted an easy to use blogging CMS with lots of advanced features and customization options. Because it’s free, anyone can download its source code right away and start exploring it to learn the basics of creating a nice blog. However, one of the frequently asked question about those that are new to WordPress is where they can install WordPress?
Technically speaking, WordPress is a CMS and it needs a PHP server and MySQL database to work with. If you buy hosting, you will be given the options to upload files to your hosting space via FTP or some online file manager. All you need to do is upload the entire WordPress directory to your hosting and then you will be able to configure it properly. But what if you don’t have any hosting and you want to explore and learn WordPress offline?
Don’t worry; it’s not silly to want this. Almost all professionals in web development field develops website offline. It’s called localhost. If you want to try out WordPress without having to connect to the Internet, that’s the only way you got. So, let’s try out preparing your PC for a decent WordPress installation.
As I’ve already said above, your computer is going to need a server and a database for WordPress to run properly. You can download PHP server and MySQL database separately. But that’s going to be a heck of a long work. Many pros prefer to do it the simplest way; that is XAMPP. Xampp is simply a package that comes with PHP server and MySQL database. So, when you install Xampp on your computer, you’re actually installing everything that is necessary to run WordPress. Head over to Apache Friends’ website and download XAMPP for Windows. (Scroll down a bit until you find the link to download xampp.)
Once downloaded, run the xampp executable file and install it on your hard drive. For example, let’s say you install it in your G drive.
The installation will take a little long to complete. At the end of the installation, a command menu will show up asking you whether or not it should create a desktop icon for you. Type y and hit enter. Then hit enter again typing y when it asks “Should I proceed?” And then type n when it asks “Should I make a portable xampp without drive letters?”, hit enter. Now xampp will be relocated and ready to use. Hit enter twice. Now you should see some choices. Simply type 1 and hit enter to open up the control panel. That’s all you need to do. This scary command will not come up the next time you start xampp, so don’t be afraid!
After you type 1 and hit enter, close the command line and the following xampp control panel will show up. It’s where you can start and stop server and database from running on your computer.
This is where you will control everything that takes place under XAMPP. For our purpose, you just have to start the first two options (Apache and MySql) each time you want to work. It’s not mandatory that you leave your server (apache) and database (MySql) running all the time. So you can simply stop them when you’re not working on localhost. You may want to double-check if xampp is installed correctly. Click the Start button next to apache. When it says it’s running, open up your browser and type localhost in the url and hit enter. If you see the xampp page, you’ve done it!
Now that xampp is installed, your PC is configured. Now it’s time to install WordPress on your localhost.
WordPress needs a MySQL database to work with. Xampp comes with the most popular user interface to handle MySQL called PHPMyAdmin. First of all, you need to create a database exclusively for WordPress. To do this, make sure you have “Started” MySQL from the Xampp control panel. Then go to your browser and type localhost/phpmyadmin and then enter. You should see the database management interface now.
You should already see a box above which it reads Create New Database. Go on, give your database a name. Let’s say wp for example. Hit enter and the database will be created. Now it’s time to finally install WordPress.
First of all, you need to download WordPress from wordpress.org if you haven’t already. Once downloaded, unzip/decompress the files. Now you should have a folder called wordpress. (Please note that in web development, folders are called directories. You should get used to that.) Copy that folder to the following location: G:\xampp\htdocs. It’s that simple. When xampp is installed, you’ll find a folder called xampp. Inside that there’s another folder called htdocs. This is your target. Everything that’s inside will show up on your browser when the server is running. So, paste the wordpress folder in htdocs.
Now, make sure both server (apache) and database (MySql) are running. Take a look at Xampp control panel. If they are, type in the url in your browser. It should be localhost/wordpress. I’ll tell you how to figure out the URL. Everything that’s inside htdocs folder comes at localhost in the browser. But we need to access the WordPress folder. That’s why we have to enter localhost/wordpress in the URL.
Entered? What do you see? A Configuration file missing error, right? That’s because we haven’t configured WordPress yet. We’ve just placed it in the right place. However, because you are a new user, I’m going to walk you through the easiest way of installing WordPress so that you don’t have to mess with a lot of codes. So, click the “Create Configuration File” button and click “Let’s Go”, now you’ll be presented with a nice configuration creating panel.
Now fill in the form. You already know the database name. It’s wp, which we created using PHPMyAdmin. User Name means database username. The default username for xampp installation is ‘root’. Type root (all small letters) in the first field. Password means your database password. Leave this field blank because in xampp installation there is no database password. It’s blank. Leave all other fields as they are and click the submit button.
WordPress will give you a message saying that the configuration has been done. Click “Run the Install” to let WordPress do the remaining task by itself. In the blink of eyes, you’ll see WordPress is asking for some common information such as Site Title, username which is admin by default, password, email address, etc. Fill out the form and click Install WordPress. Guess what, WordPress has been installed!
And that’s it! Anytime you want to log in to your WordPress site, simply start up apache and mysql, go to localhost/wordpress and login with your credential. In this way you can create as many WordPress sites as you want. Just remember to choose different name for different directories and database names.
I hope it’s been incredibly easy for you to follow along the tutorial with me. If you have anything to ask regarding the process of installing xampp or WordPress on your Windows machine, please ask. I’ll be open to questions.