In this blog I will show you how to setup a WordPress environment locally on your Windows PC, so you can develop websites locally on your machine without the danger of breaking anything in a live environment. Most websites in the world sit on a Linux web server, the set of technologies WordPress uses are commonly called the LAMP stack, meaning Linux, Apache, MySql and PHP. In this blogs case we are not using Linux instead we are using Windows, aka WAMP stack.
My hassle free step by step instructions below will have you up and running in no time and I have made it super easy for you to understand.
1. Download and Unzip my wamp zip file, please send me an email and place into your window structure C:\_Dev\ so you should have two sub directories C:\_Dev\apache24\ and C:\_Dev\php\
2. Create a Windows desktop shortcut and point to C:\_Dev\apache24\bin\httpd.exe
3. Click on the shortcut to run the apache web server.
4. To test its the webserver can serve web pages click on the following link http://127.0.0.1:8080/ .You should see a html test page.
5. Then click on the following link to see that PHP is working as expected http://127.0.0.1:8080/phpinfo.php If this web page renders showing PHP information then your good to go.
To stop the web server just close the httpd.exe window. The main apache configuration file is located in C:\_Dev\apache24\conf\httpd.conf. Your website file location where you deploy all your website files is C:\_Dev\apache24\htdocs\ Your logs directory C:\_Dev\apache24\logs\ The main php configuration file is located in C:\_Dev\php\php.ini
1. You will need to install the MySql Installer by clicking here https://dev.mysql.com/downloads/installer/
2. To browse your database in a nice a graphical user interface and to allow you run SQL script, you will need to install the Workbench client application. Click here https://dev.mysql.com/downloads/workbench/
On install you will be asked for a MySql instance password, enter one in and make a note of it for later in step 4.
3. Make sure your windows MySql Windows service is up running. To check your service is running, simply hit the WINDOWS KEY + R on your keyboard which will open the Run dialog prompt. Type ‘services.msc’. Find the ‘MySql’ name listed and look to the see if the status is ’Running’, if not right click and start.
4. Go to MySQL Workbench and click on ‘Local Instance MySQL’. You will be asked to enter a password noted from earlier. Then in the editor window type ‘create database mytestdb’. Select the text then click the lightening execute button.
On the left hand side navigator Schemas window click the refresh icon to see the new database listed.
5. On the Left hand side Navigator window with the Schemas tab, Right click on the ‘mytestdb’ and choose ‘Set as default Schema’.
6. You now need to setup a database user. In the Left hand side Navigator window, choose the Management tab. Click on ‘Users and Privelages’ Add a new user account, login Name ‘mytestuser’, password ‘pass123’. Apply.
1. Download WordPress zip file by CLICKING HERE and choosing the Download WordPress button.
2. Unzip the zip file to the C:\_Dev\apache24\htdocs\ directory. So that in the root of this folder there are php files like wp-login.php and folders wp-admin wp-content wp-includes.
3. Click on the following link http://127.0.0.1:8080/ which should give you the WordPress setup-config page.
4. Where it says Database Name put in mytestdb, username mytestuser, password pass123. Leave Database Host as localhost. Click Submit. Follow the steps and WordPress will now setup your website.
These configuration settings are stored in the file C:\_Dev\apache24\htdocs\wp-config.php if you need to change.
1. WordPress already already includes 3 default themes as part of the installation. To install your own theme. Copy the extracted theme files to C:\_Dev\apache24\htdocs\wp-content\themes
2. The new Theme will be listed under the Themes section in the WordPress portal, then you can click and activate.