This is a post in series WordPress 101, see previous posts:
As a part of the WordPress 101 series – fundamental knowledge about WP, in this article of Installing WordPress Locally, I will introduce you steps of local WP installation. Either you are a normal WP user who just use WordPress as a blog or website framework or you are a WordPress developer who creates WP themes, plugins, you all have to know how to install WordPress in your computer. This simple work will help you test the site locally with a virtual server, so there is no need to buy a real server to test it.
There are 3 ways of installing WordPress locally on Mac and Windows using MAMP for Mac, WAMP for Windows and XAMPP for both. You can choose one of your interests, the installation ways are similar so today I just shortly introduce you how to do it with XAMP which I am using.
Installing WordPress locally
First of all, you have to download XAMPP from its official website. Then, install XAMPP to your computer. In the process of installing XAMPP, you should choose the directory of XAMPP to the partition differently from the one containing system file. Cos when the re-installation of your operating system is requested, you do not have to back up the XAMPP files. After installing XAMPP successfully, open the XAMPP application (name “manager-osx” on OSX) and start running Apache web server and MySQL.
The Apache web server and MySQL database are now running locally in your computer. Now, you need to download WordPress to your computer>> put it in htdocs folder of XAMPP>> rename wp-config-sample.php file to wp-config.php >> open wp-config.php, and edit following value:
- DB_NAME (name of your database for this site)
- DB_USER (MySQL user name)
- DB_PASSWORD (MySQL password)
- WP_DEBUG (set it true if you want to echo error out to frontend – default is false)
Then, open your browser and go to localhost/phpmyadmin to create database use for the website:
And here is my wp-config.php file:
Now you can go to localhost/wordpress_test (name of the folder you put your WordPress in) to start setting up your site
Choosing language for your WordPress site.
Providing necessary information for your site and click Install WordPress then the WordPress site is ready to run locally in your computer.
Install Multisite WordPress
In order to create Multisite WordPress, you need to edit wp-config.php. You can follow detail official instruction from here.
Download plugin directly
If your computer is using a linux base Operating System, you might require to enter your ftp username, password so that you don’t have to download plugin. To solve this problem, you just need to insert these lines to your wp-config.php:
|/**Allow direct download**/|
There are many ways to run WordPress locally instead of online installation for developing and testing. XAMPP is a cross platform tool and also an open source, it means you can use it in any operating system and free. XAMPP allows you to operate WordPress perfectly in a close environment to your real online website in the future. Do you use XAMPP? Tell us your thought about it. In future posts, we will introduce you how to deploy a ready site online easily and automatically.