If you like to deploy and test a WordPress site on local PC, you can choose to install the XAMPP server or other similar software on your computer, then set up the WordPress site on XAMPP server on your local PC or Mac. XAMPP provides us the easiest way to configure the PHP and Apache environment on local computers. In this article, we will discuss how you can download the latest version of this free software and set up your first WordPress site on your Windows or Mac computer.
Steps to install WordPress on Windows PC via XAMPP
Visit the XAMPP site, then choose the right version to download. XAMPP versions are released to support the new PHP versions. For example, the new XAMPP version 7.1.1 supports latest PHP 7.1.1, XAMPP version 7.0.15 supports PHP 7.0.15. In this demo, we will use a Windows 10 computer and the latest XAMPP for Windows version 7.1.1.
The XAMPP will be downloaded and saved onto your computer as a ZIP file. You need to unzip it first before installing it on your computer. Start the XAMPP on your Windows computer. From the XAMPP control panel, start both Apache and MySQL modules. You will need to turn on these two services in order to setup WordPress site on XAMPP server.
Go to download WordPress installer from this link.
Open XAMPP home directory in File Explorer on your PC, open sub-folder ‘htdocs‘, then move the WordPress auto installer package, a zip file, from your browser download folder to this XAMPP htdocs folder and unzip it, you will get the wordpress folder with all WordPress site files.
We need to create the database for WordPress now. Go to XAMPP Control Panel and click the Admin button in the MySQL module, or visit http://localhost/phpmyadmin/ in your browser to open the database manager on your Windows PC. Now refer to these steps to create MySQL database and user in phpMyAdmin on XAMPP server. After that you will get the essential database information as below:
- Database name
- Database username
- Database password
- Database host
Open the File Manager on your PC. Browse to the WordPress folder, find the wp-config-sample.php file, rename it to wp-config.php. Then open this configuration file using Notepad or other text editor on your PC. Find the MySQL Settings in this configuration file. Here you need to input database name, username, password and hostname. Save the change after the editing.
Now visit your local WordPress site URL, localhost/wordpress/, using a web browser on your PC. You will get the WordPress installation screen. Here, you need to provide Site Title, Username, Password and email address. Finally click the Install WordPress button to finish setting up WordPress on XAMPP server on your Windows computer.
You can log on WordPress dashboard to start building the site on your PC.