Some people prefer that nobody except them has access to a website that they are building. That is why they install WordPress on their computer and set it up on a local server. It’s also a good way to test the website before uploading it to the live server and to work on it without an Internet connection, and sometimes developers will choose to do this as well. To install WordPress on a local server, the first thing you need to do is to have a local server.
Because WordPress files are written in PHP, and that is a server-side language, and WordPress runs on top of it. Since the server-side application only, run on a server with the PHP interpreter. Therefore, if you don’t have a server at your home, it’s necessary to download one for you. To read a script written in PHP, you will need not only a server, but also a database, and interpreters for PHP. There are four main Web server packages that you can download that have all the above: Mamp, Wamp, Xampp and Lamp. All of these packages include the Apache HTTP server, MySQL database and different interpreters for PHP. The main difference between all of them is the operating system that they are designed for. Mamp was created for the Mac, Wamp was made for Windows, and Xampp is designed for all operating systems and Lamp is designated for Linux.
To make a long story short, by downloading one of these packages you will have a local server on your computer that can run WordPress without the need to being connected to the Internet.
So, in summary here is what you have to do to get a local server onto your PC:
Run the installer and let the process run until it completes. Run the package, and a control panel will open, start the Apache and MySQL and wait until both indicators turn green.
Most likely that your Apache won’t start, do not be alarmed at this, it is a very common occurrence, it happens in almost 95% of the installations. This is because Apache “demands” a whole port for itself and it if it cannot get one it does not come up. By default, it tries to grab port 80. This is rude of Apache! Since these days, almost every user has Skype, and by default, Skype’s port is 80, as well. Fortunately, Skype isn’t as picky as Apache, and it listens on port 80 along with other apps and programs. So, instead of searching and changing all the programs we listened to port 80 it’s just better to change Apache’s port and give it a port of its own.
Next, you need to download a copy of WordPress and run its installer next. WordPress will ask you to give it the following information while you are installing it:
To install WordPress, you will need to go to WordPress website and download the necessary files. They will come to you as a zip file. Extract the WordPress file and transfer it to “htdocs” file, which is inside your Xampp local server file. Unless you change the location of Xampp’s directory when you install it, you should find it located at C:\Xampp\htdocs.
Now you can use your WordPress account to log in and “Presto” you are in and up and running! The next time you want to go on your website just type in localhost/”site name” or localhost/WordPress in URL line of your browser. You can determine the website’s name when creating the WordPress account and you can also change it later the on the dashboard; it’s the name of the file that you transferred into the htdocs file. Changing the site’s name will change the files from “WordPress” to whatever you named it.
There, you are done, you can now work with the website and change things to your heart’s content until everythig is just the way you like it to be transfered to a live server for testing and use. Please feel free to look at our other articles here, and we’re sure you’ll find more tidbits and help to make you a better Web Developer.