For this site and for client sites, we use HostGator WordPress Hosting or one of a few other hosting providers. With a few exceptions, most do not provide a free staging or development area. For that, and a variety of other reason’s, we often lean on a few different solutions for spinning up local WordPress web servers. WampServer is one of those solutions.
What is WampServer?
WAMP stands for Windows, Apache, MySQL, and PHP. WampServer is a Windows hosting and web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database. WampServer also includes phpMyAdmin which allows you to easily manage your databases.
WAMP Server Training: Learn WAMP Server online. Courses as low as $9.99 at Udemy!
Using a local version of WordPress with WAMP will help you build and test your website, themes and plugins before putting it online. Remember, only you or your local network (if setup) will be able to view this site.
Make sure that you are up to date on all versions of Visual C++ Redistributable before running the WAMP installation.
Step 1: Download and Install WampServer
Wampserver is available in both 32 and 64 bit. Make sure you select the correct installer for your version of Windows. Wampserver is not compatible with Windows XP, SP3, or Windows Server 2003. The latest version of WampServer can be found here https://sourceforge.net/projects/wampserver/.
Navigate to your downloads folder and find the WampServer installation file. Double click the file to start the installation process. It’s best to leave everything at the default settings. You do have the option of choosing a preferred text editor and web browser. I personally use Notepad++ and Google Chrome because these are better for web developers.
Step 2: Make sure Everything is Working
After the installation has finished you will need to look at your taskbar for a Green WampServer icon. If it is green then everything should be good to go. If the icon is orange or red there is a problem with Apache or mySQL. You will need to fix these problems before you can move on.
Step 3: Create a Database in phpMyAdmin
WordPress will need a database to install on so we will need to create one. Left click the green WampServer icon in your taskbar and choose phpMyAdmin or just go to http://localhost/phpmyadmin/. The default username is “root” and just leave the password field blank. Click the “Go” button to login.
On the left side of the screen you will see “ New”. Click it to go to the creation page where you can create your new database. You can also drop databases here if they are no longer needed.
The creation page lets you name your database. Name it anything you want and click the “Create” button. Remember the database name you choose as it will be used later for the WordPress installation.
Step 4: Download and Install WordPress
The latest version of WordPress can be found here https://wordpress.org/download/.
Navigate to your downloads folder and extract the contents of the wordpress.zip file. You will need to copy the entire WordPress folder to the directory c:/wamp64/www/ for 64 bit or c:/wamp/www/ if you are using 32 bit. You can also get to this folder by left clicking the WampServer icon in the taskbar and selecting “www directory”.
Step 5: Setup your WordPress Configuration
Open your web browser and type in http://localhost/wordpress/ and select your preferred language to get the WordPress Installation started.
The next page tells you it needs some information about your database. This Information will be used to create a wp-config.php file. A very important file that you can edit anytime you move your website to a new web host. Click the “Lets Go” button.
On this page you will see five fields: Database Name, Username, Password, Database Host, and Table Prefix.
For Database Name you will need to put in the database name you chose in the previous steps. Username is “root” and once again leave the password field blank. Database Host and Table Prefix need to stay on the on the default settings. Click the “Submit” button.
Next you will be asked to give your website a name, create a user, create a password and give your email. Fill out all the fields and click “Install WordPress”.
Step 6: Access your New WordPress Website
That’s it! If everything went right you should now be able to access your new WordPress website on your local computer by going to http://localhost/wordpress/.
To login and edit you new WordPress website go to http://localhost/wordpress/wp-login.php and use the username/password you created in the previous step.
WAMP Server Training: Learn WAMP Server online. Courses as low as $9.99 at Udemy!
If you enjoyed this tutorial, please be sure to follow us on Facebook and Twitter. You can also find us on Freelancer if you need some help with your WordPress website or web development issues.
it was really helpful, thanks
Thanks for the tips. its really help unlike some useless videos on youtube
Hmmm. That’s a good one. I’m going to hope someone in the community that has faced the same issue replies. But, in the mean time, if I can find an answer I will absolutely post it. Fingers crossed.
Any ideas why I can’t get WordPress to create the initial config file? I installed WAMP Server and it is all up and running. The wordpress folder is extracted and dropped into the www folder, going to localhost in my browser works, I logged into myphpadmin and created a database named wordpress, I created a password for root to secure everything and included that on the initial WordPress setup page but no matter what I do, I keep getting the “error establishing database connection”. I have done some searching and even attempted to modify the sample config file and enter the information manually and save it as wp-config.php and when I go back to setup I get the same error. I also went to the link regarding the C++ Distributables and installed those per your instructions on this site. Any help is greatly appreciated. Thanks!
I have the same problem and wonder whether you have ever fixed yours. 🙂