Install WordPress on a Windows or Mac
Learn how to install WordPress locally on a Windows or Mac computer to make learning WordPress easier or developing and testing websites faster. For example, a local installation is a great way to check the compatibility and stability of plugins or themes before you deploy them to your live site.
XAMPP contains the Apache server, MySQL, Filezilla FTP server, Tomcat, and Mercury. However, we will only be focusing on using the Apache server and MySQL to run WordPress on your computer. You are welcome to search for information on using the other components if you would like to learn how to run your own web server. However, running a web server is very complex due to security and performance issues, so we recommend leaving that to a reputable web host.
To Run WordPress Locally You Will Need to Install
- Apache Web Server
- MySQL Database Server
Step 2: Install XAMPP
Now that you have downloaded XAMPP you need to install it.
Window Computers: Click the file you downloaded to copy the portable version of XAMPP to your C: drive, which is normally the drive where Windows is installed.
Next you will need to select the services you wish to install. You will need a minimum of Apache, MySQL, PHP and phpMyAdmin. You can uncheck FileZilla, Mercury, Tomcat, Webalizer and Fake Sendmail to save a little space or leave them all checked, which is the default setting.
Macintosh: (no screenshots) This is just as easy, just unzip the file you downloaded and drag that folder into your Applications folder.
Step 3: Testing Your XAMPP Installation
Your local server should be installed and ready to go, but before we install WordPress let’s test your XAMPP installation to make sure everything works properly.
Starting XAMPP (Windows)
Navigate to the folder where you installed XAMPP (C:/xampp/) and click on the “xampp-control” icon, which will start the control panel. Now click the Start button next to Apache and MySQL. If it is working properly the names of the services will be highlighted in green. Red or yellow indicates a problem with your installation.
Starting XAMPP (Mac)
To start XAMPP simply open XAMPP Control (by going to /Applications/XAMPP/XAMPP Control in Finder) and start Apache and MySQL. If the MySQL server does not start, you may need to set the permissions to 777 using Terminal.
The command is “chmod -R 777 /Applications/XAMPP/xampfiles/var” without the quotes.
Step 4: Installing WordPress on Your Local Server
Now that your local server is up and running, you are ready to install WordPress. This is actually quite easy to do, but there are quite a few steps involved, so follow the instructions below carefully and you will have WordPress up and running in minutes.
Open phpMyAdmin by Clicking the Admin Button
Create a Database Named “wordpress” Using phpMyAdmin
Download The Latest Version of WordPress – Click Here
Right Click the Zip File You Download and Click “Extract All”
Open the Folder and Rename wp-config-sample to wp-config
Edit wp-config With a Text Editor Like Notepad or Notepad++
The database name is the same as you created, which is “wordpress” without quotes. The username is the server default “root” without quotes and the password should be blank, so you will need to delete “password_here” but NOT the single quotes. Click on the link https://api.wordpress.org/secret-key/1.1/salt/ in your text editor or copy and paste it into your browsers address bar and replace the lines of code below. Be sure that you ONLY REPLACE THE CODE HIGHLIGHTED IN THE IMAGE BELOW.
Your Edited wp-config Should Look Like The Image Below
Please note the “Unique Keys and Salts” will be different than pictured, which is the normal and desired result, since these are unique security keys, which should be different for every WordPress website you create.
CONGRATULATIONS! The Hard Part is Over.
Now Let’s Finish Installing WordPress
The last step is to copy your wordpress folder to C:\xampp\htdocs and type or copy and paste http://localhost/wordpress/ into your browsers address bar. Select your language, and follow the prompts. Even though this is a local install you should use a strong password since the username password will remain the same should you decide to transfer your WordPress website to a web host in the future.
Congratulations on installing XAMPP and WordPress Locally on your computer. Whether you are an experienced developer or new to WordPress, you are going to love being able to do almost anything you can do on a hosted site, at blazing fast speeds.
- Install XAMPP on Windows, Mac, or Linux
- Local WordPress Installations are FAST
- Install Multiple Instances
- Fantastic for Beginners
- Essential for Developers
Note: Your computer’s resources are the only limit to the number of WordPress installations possible. However, since you will typically only run one or two sites simultaneously, it is unlikely you will ever run into any issues. At My Island Designs, we have created over one hundred local sites on a single computer without any problems.