How To: Install WordPress Locally

9
936
How-to-Install-WordPress-Locally-Using-WampServer
How-to-Install-WordPress-Locally-Using-WampServer
In this post we’re going to talk about how to install a WordPress site on a local machine,and to access it through the local network. First of all, to set up a blog offline, you need have to download some PHP Hosting software. There are several well-known options, but we’re going to use XAMPP for this, because I found I had the least hassle with it. You can download it here from SourceForge.

READ MORE // How to: Install and Activate Jetpack
Once you have downloaded and installed it like you would any other piece of software, open it up from the “˜All Programs’ menu. The window shown below will appear:

 

LocalHost - XAMPP SC
Beside Apache and MySQL, select “˜Start’ so that they are both running like in the screenshot. Now, your local host is up and running and is available to be prepared to accept WordPress. First however, we must make a database for WordPress to be saved in on the host.

localhost - browser homepage

To do this open your browser and enter “˜http://localhost/’ into the address bar. This will bring you to the screen shown above. From the menu bar on the left, select phpMyAdmin as illustrated.

 

localhost - create database
In the center of the screen is the section where you create a new data base. Name your server and select collation from the dropdown menu if it’s not already selected. In the second dropdown menu select “˜uft8_unicode_ci’. I cannot emphasise how crucial it is that you do not overlook this. It is not selected as default so ensure you have it selected. It’s the last one in the list. Without it, the host won’t communicate with WordPress and you’re in a world of problems my friends.  If you can’t tell I’m talking from experience. I spend an hour yesterday trying to figure out what the problem was!
Once your server is created you’re ready to embark on the world-famous “˜Wordpress five minute install’ and finally set up your blog. Download WordPress from here. When you have the .zip file, extract its contents to this location:
C:\xampp \htdocs
Your final folder structure should look like this:

 

localhost - file structure
If it doesn’t, open the XAMPP program file and drag the extracted WordPress file into it manually. It must be in there in order for your newly created database to detect it. Then, edit this file using Notepad:
C:\xampplite\htdocs\wordpress\wp-config-sample.php
Scroll down to the part where it asks for database name, username, password etc.. Fill in the details below:
DBNAME: *whatever name you gave to your database*
DBUSER: root
Password: “˜ ‘ (This should just be left as two opposing apostrophes)
Then, save the file as wp-config.php instead of the original wp-config-sample.php.
Now, open your browser and enter in the following URL:
http://localhost/wordpress/wp-admin/install.php
This will take you into the WordPress installation just like you were online. Remember, when you’re returning to your PC to do more coding ensure you have Apache and MySQL turned on – otherwise http://localhost/ won’t exist!

 

Now if you access it from some other machine ,the browser will not be able to get the css and the styles for the page. Resolve the issue by logging into the WordPress install as admin from the localhost system and changing the “General Settings” for “WordPress address (URL)” & “Blog address(URL)” from http://localhost/wordpress to http://172.18.9.3/wordpress (substitute the LAN IP address of your XAMPP server).

I assume this allows the WordPress php to properly assign absolute paths to resources.  There you have it.  Wordpress.  Local and Live.
For more How To’s and Tutorials, follow us on
Twitter,Google+, Tumblr,Instagram and on Facebook

9 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here