Here are the steps for installing XAMPP on your computer:
DOWNLOADING AND INSTALLING XAMPP
- Go to https://www.apachefriends.org and click on “download” in order to download XAMPP to your computer. You can select your operating system (windows, linux, or OSX (Mac)) and either download automatically from the landing page or enter the download area through the menu bar. Either will achieve the download, but you’ll probably have to wait a while because the download takes a few minutes to complete.
- Double-click to open the XAMPP installer file (the one you just downloaded). Click “Next” to begin the installation process.
- Select the applicable software by checking the boxes beside the following selections: Apache, MySQL, PHP, and phpMyAdmin. Then click on “Next”.
- Install the XAMPP file either in your “documents” folder or on your C-Drive—OS(C:). Leave the box by “Learn about Bitnami” unchecked.
- Then unpack the files by clicking on the XAMPP folder. This may take a few minutes. Click on “Finish”, and you’ll be taken to the XAMPP Control Panel. The XAMPP Control Panel may take as much as 60 seconds to appear.
- In the XAMPP Control Panel, click on the two “Start” buttons to the right of “Apache” and “MySQL”. This starts XAMPP, and once it’s set up, it will run in the background while you’re working on your website locally.
- Then go to your browser, and in the address bar (url bar), type “http://localhost/”, which will take you to the “Welcome to XAMPP” dashboard. The url in the address bar will change to “localhost/dashboard”.
- Apache and MySQL must be started in the XAMPP Control Panel (Apache and MySQL) for the XAMPP dashboard to appear in your browser.
Other software that you are using on your computer may conflict with XAMPP and cause it not to run. Skype is one example of software that can block XAMPP, and some folks choose to uninstall Skype in order to eliminate the problem.
Uninstalling Skype (or any other conflicting software) is not necessary, though. It is sufficient to log out of Skype in order to use XAMPP. (Closing Skype is not enough because it still runs in the background. You must either log out of the conflicting software or delete it altogether.)
On my system, Apache uses ports 80 and 443, and MySQL uses port 3306. When you click on the “Start” buttons, these port numbers appear to the left.
If you are unable to start Apache and you don’t know which port is causing the conflict, you can permanently eliminate the problem by changing the port numbers as follows:
- Go to the XAMPP Control Panel and left click on the “Config” button on the Apache row of buttons. A box will appear, and you should choose “Apache(httpd.cong)” (the first item in the list).
- In this document, use the “find” (CTL-F) function to search for the word “listen”. Look for “Listen 126.96.36.199.80” and change the last two digits to 800 (add a 0). This now becomes “Listen 188.8.131.52.800”. Then use the “find” (CTL-F) function to search for the word “servername”. Look for “ServerName localhost:80” and change the two digits to 800 (add a 0). This now becomes “ServerName localhost:800”.
- Save the file and close it.
- Again go to the XAMPP Control Panel and left click on the “Config” button on the Apache row of buttons. The same box will appear, but this time you should choose “Apache(httpd-ssl.conf)” (the second item in the list).
- In this document, use the “find” (CTL-F) function to search for the word “listen”. Look for “Listen 443”, and change it to “Listen 4430” (add a 0). This becomes “Listen 4430”. Then use the “find (CTL-F) function to search for the word “virtualhost”. Look for “VirtualHost_default_:443”, and change the number to 4430 (add a 0). This becomes “VirtualHost_default_:4430”.
- Save the file and close it.
- Then go back to the XAMPP Control Panel and click on the Config button at the top right (not the one on the Apache row).
- A Configuration Control Panel will open. Click on “Service and Port Settings”, and change the number 80 to 800 (add a 0). Then change the number 443 to 4430 (add a 0). Click on “Save”.
- Apache should start and run on Ports 800 and 4430 without conflicting with anything. If it still won’t start, it’s because the new port numbers are being used. Simply go through the steps above to change them until you find ones that are not in use.
- You’ll have to enter “localhost:800”, though, in order to get to the localhost XAMPP dashboard. You can no longer just enter “localhost” to get to the dashboard because the default settings are no longer applicable. (The XAMPP Control Panel and the XAMPP dashboard are not the same thing. The XAMPP Control Panel is for starting and stopping Apache and for configuration settings. The XAMPP dashboard gives you access to phpMyAdmin for managing your databases.).
- Also, when you want to access your WordPress website you’ll have to use the port number in the url to get to the login screen, i.e. “localhost:800/siteName/”.
- If you do not change the ports, you do not need to include the port number in the url because it’s the default.
INSTALLING A WORDPRESS DATABASE
To install your WordPress database, go to the XAMPP Control Panel and click on the “Start” buttons for Apache and MySQL in order to start XAMPP. (If you can’t find the XAMPP Control Panel in an icon of a toolbar on your desktop, you’ll have to look for it in the “Start” area of your computer. I am running Windows 8, and it’s in the “Apps” section at the far right end. The down arrow on the bottom left of the “Start” page takes you to the “Apps” section.)
Click on the Apache Admin button, which opens the XAMPP dashboard in your browser. (Another way to get there is by entering “localhost/dashboard” in the url bar of your browser.)
From the XAMPP dashboard, click on “phpMyAdmin”, which takes you to the “phpMyAdmin” screen. In the “phpMyAdmin” screen click on the “home” button, which is a small icon of a house at the top left of the page. This will make the “Databases” button available on the left end of the horizontal menu at the top of the main content area of the page.
Click on the “Databases” menu button. In the “create database” input box, enter the name of your database. You can choose any name you want. Ignore the “Collation” selection box. Click on “Create”.
The name of your new database will appear at the bottom of the list of databases in the left sidebar.
DOWNLOADING AND INSTALLING WORDPRESS
Go to http://wordpress.org and click on “Download” for the most recent version of WordPress. (The download process takes a while.)
The file will be a zip file. Open the zip file, and drag the WordPress folder (that is inside the zip file) into the XAMPP folder that you put on your computer and drag it into the “htdocs” folder that is inside the XAMPP folder. You can delete the empty zip file. Assuming you put your XAMPP folder inside your “documents” folder, the path will be “documents→XAMPP→htdocs→wordpress”. On my system, I’ve put the XAMPP folder inside my C Drive, so the path is OS(C:)→XAMPP→htdocs→wordpress. (You can change the “wordpress” folder name to any name you wish. I use my site names.)
Now open the “wordpress” folder and click on the “wp-config-sample.php” file. Rename the file to “wp-config.php”. (If you have both a “wp-config-sample.php” file and a “wp-config.php” file just delete the “wp-config-sample.php” file.
Then open the “wp-config.php” file in your text editor. I use Notepad++, but there are lots of good editors like Sublime Text, Brackets, Atom, Coda, and more.
In the “wp-config.php” file scroll down to the MySQL settings section.
- On the first line of that section, change “database_name_here” to the name of the new database that you created in phpMyAdmin.
- On the second line, change “username_here” to the username “root”. (“Root” is a standard that has certain default privileges.)
- On the third line, change “password_here to “”. (Leave it blank with no space between the quotation marks.)
- Save the file and close it.
Now WordPress is installed, and you can go to your new WordPress installation by going to “http://localhost/folderName”. (After localhost, put the name of the folder that you installed inside the “htdocs” folder. In the example above, it’s “wordpress”, but you can use any name you want. If you have several websites, you may want to use the site names themselves.) Then hit “return”, which will take you into a short series of setup screens.
Click on the language of your choice, and you’ll be taken to a second setup screen. At that screen, you need to enter three things:
- Site Title: enter a site title. You can change this later in the “General Settings” section of your WordPress dashboard.
- Username: enter a username. You can put anything here you want, but for security reasons, it’s best to enter something other than the word “Admin”.
- Password: enter your new password twice.
If your site is a test site, or if it will take some time to develop, you may want to leave the box at the bottom unchecked so that search engines will not index the site. You can change it later when your site is ready.)
Click on “Install WordPress”, and WordPress then creates tables for your database and sets the default settings.
A “Success” page will appear. Click on “Log On” to go to your WordPress dashboard login page. Enter your username and password, and click on “Log In”. You are now in the WordPress dashboard of your site.