Site icon WPArena

WordPress 101 – Installing WordPress Locally

how to install wordpress

This is a post in series WordPress 101, see previous posts:

WordPress 101 – Things to Start with WordPress

As a part of the WordPress 101 series – fundamental knowledge about WP, in this article of Installing WordPress Locally, I will introduce you steps to local WP installation. Either you are a normal WP user who just uses 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.

Installing WordPress
MAMP stands for Macintosh,  Apache, MySQL and PHP.

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
WAMP stands for Windows, Apache, MySQL and PHP.

Installing WordPress locally

Installing WordPress

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.

Installing WordPress locally with XAMPP

The Apache web server and MySQL database are now running locally on 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:

  1. DB_NAME (name of your database for this site)
  2. DB_USER (MySQL username)
  3. DB_PASSWORD (MySQL password)
  4. 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 a database for the website:

Installing WordPress locally

And here is my wp-config.php file:

Installing WordPress locally

Now you can go to localhost/wordpress_test (name of the folder you put your WordPress in) to start setting up your site

Installing WordPress

Choosing a language for your WordPress site.

Installing WordPress

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 based Operating System, you might require entering your FTP username, password so that you don’t have to download the plugin. To solve this problem, you just need to insert these lines to your wp-config.php:

/**Allow direct download**/
 define('FS_METHOD','direct');

Conclusion

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 closed 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.

Exit mobile version