Develop A WordPress Site On Your Computer Before Making It Live
My first web design job was a website redesign. Switching the current website from a static HTML website to the WordPress CMS. The challenge was to make sure there was no downtime for the organization’s clients needing daily service and scheduling information while I was developing. The solution was setting up a local server for WordPress on my computer then migrating the finished site to the live server.
Another reason for setting up WordPress on a local server is not wanting a random internet surfer to preview your incomplete work, especially when starting to customize a fresh wordpress site. If you’re a startup, a good first impression is important for keeping visitors coming back or believing in your product. You may also risk search engine bots logging broken links or logging “work in progress” content pages devaluing your search engine rankings.
Unlike a static HTML website where it’s easy to view your progress through a browser, building or customizing a WordPress theme you need the full functionality as if it were live. Which is what makes WordPress so remarkable, the ability to capitalize on the vast free widgets and plugins available.
For those who are just starting to get used to the local concept, in this article I will explain how to setup WordPress locally for both Windows and Mac.
Setting Up A Local Server For WordPress On Windows
XAMPP Install
- First install the free open source program called XAMPP which will act as your apache server. For those interested XAMPP stands for Cross Platform (X) Apache MySQL PHP Perl.
- Go to apachefriends.org.
- Download the XAMPP for Windows version.
- Find where the directory XAMPP was downloaded to (usually the windows downloads folder) then double-click the folder to begin the install. About 5 minute install.
- Select the “launch when finished option.”
- In the XAMPP control panel, we now want to start the Apache and MySQL web servers by clicking the start button under actions for both. **If you get a warning, make sure to click unblock or allow access.
- Test XAMPP is working properly by opening your browser and entering http://localhost into the address bar. If working properly, the XAMPP logo/splash screen should come up.
Setting Up A Database
- In your browser’s address bar, enter http://localhost/phpmyadmin to open the PHP console panel.
- Next click on the “New” button to set up a new database.
- Name the database. Since this is a local setup, the name of the database isn’t important. Example DB Name: wordpress. > Create.
- Add a new user.
- Open the new database just created to set up a new user.
- At the top menu, click on the “Privileges” tab. Then click on “Add User”.
- Fill in a username. Example: wordpress (I like to keep it simple so I don’t have to remember usernames and passwords).
- Change the host from “any” to “local” from the drop down menu.
- Create a password. Example: wordpress. Then confirm/retype the password.
- Scroll down to to the bottom and click “go”.
Downloading and Installing WordPress
- Go to wordpress.org and download the latest version of WordPress to your computer. Yes, it’s free.
- Unzip the WordPress folder download by double-clicking on it. A window should pop up with a single file named “wordpress” in it. We will eventually move the “wordpress” file into a XAMPP folder but first we have to navigate to the folder it will eventually be moved to.
- Go to the XAMPP console, click “explorer”. Which will open the XAMPP folder. In the XAMPP folder look for another folder “htdocs” and open it. This will be the location where wordpress will live on your local server. Recap: XAMPP console > Explorer > htdocs.
- Move the “wordpress” folder into the “htdocs” by drag and dropping. The wordpress file should take a minute to copy over.
- Navigate to the new folder by going to your browser and entering http://localhost/wordpress into the address bar. You should see the WordPress logo with the option to choose your language.
- Choose your language > Continue > Let’s Go.
- Enter the database information you setup earlier > Submit > Run the install.
- Finish adding additional information in the wordpress installer. In a live server situation you would want to create a very strong username and password…not as important in a local server situation.
- Site Tile. Example: My Local WordPress Site
- Username. Example: admin
- Password. Example: admin
- Email. Example: yourname@email.com
- Click Install > Login
- When you get to the Login page enter in the username and password you just created.
- Your local wordpress dashboard will now reside at http://localhost/wordpress/wp-admin. Make sure to have the XAMPP control panel open with Apache and MySQL running every time you want to work on your wordpress site.
Setting Up A Local Server For WordPress On Mac
MAPP Install
- Go to mamp.info, scroll down and choose which version of MAMP you would like to install. Free version is fine. Then click download. For those interested MAMP stands for My Apache – MySQL – PHP.
- Install and launch.
- Next we will point MAMP to the location where we will install WordPress, which can be anywhere. For demo I will install on my desktop.
- Create a new folder on your desktop and name. Example: localwordpresssite
- Click “Preferences” on MAMP console. Then click on the “Apache” tab and select the new site folder you just created. OK.
- If servers don’t start automatically, click on “Start Servers”.
- You will know it worked correctly because your web browser should open automatically with the MAMP welcome page. http://localhost/MAMP/
Setting Up A Database
- Navigate to phpMyAdmin console.
- The MAMP welcome page in your browser should still be open. At the top menu click on the “phpMyAdmin” tab.
- Name your database in the “Create new database” text box. Example: wordpress. Create.
Downloading and Installing WordPress
- Download WordPress.
- Go to wordpress.org and download the latest version of WordPress to your computer.
- Double-click on the downloaded .ZIP file and extract the “wordpress” file.
- Move the “wordpress” files into new site directory we created on our desktop. My example: localwordpresssite file.
- Install WordPress
- Navigate to http://localhost/ in your browser.
- The WordPress logo with the language selection dialogue box should appear. Select language > Continue > Let’s go!
- Fill in the database information.
- Database Name: My example: wordpress
- User Name: root
- Password: root
- Database Host: localhost
- Submit > Run the install
- Finish adding additional information in the wordpress installer. In a live server situation you would want to create a very strong username and password…not as important in a local server situation.
- Site Tile. Example: My Local WordPress Site
- Username. Example: admin
- Password. Example: admin
- Email. Example: yourname@email.com
- Click Install > Login
- When you get to the Login page enter in the username and password you just created.
- Your local wordpress dashboard will now reside at http://localhost/wp-admin. Make sure to have the MAMP control panel open every time you want to work on your wordpress site.