Installing WAMP on your computer to run WordPress

My goal is to install WordPress on my “local” computer for a project that will take some time to complete. To complete this task, I need to install WAMP on my computer.

WAMP is package of Apache, which is a web server PHP which is a server-side scripting language and MySQL which is open-source relational database. You can do this by downloading and install the package known as WampServer which is referred to as software stack or package.

Before you download and install this stack I wanted to encourage you to read this article first before you start. This will give you a good understand of the steps you are going to take. Be prepared to complete this task at one time so you do not miss any steps.

To download WampServer go to www. wampserver.com and download the correct package for your system. If you have 32-bit system you will need to download the WampServer 32 bit (x86) or if you are running a 64-bit system you will need to download the WampServer 64 bit (x64).

What I did was create three steps for completing this project.

Step 1 Install WAMP stack

Step 2 Setup test database for MySQL

Step 3 Install WordPress

At the time of this writing I downloaded and install the 64-bit version 3.1.0

Go ahead and download the package for your system and run the exe.

Launch phpMyAdmin
Information Important Read

Remember me saying to read this document first? The above was a surprise during install, read this information and make sure the following is completed first before going any further with the install of WAMP.

Make sure the following Microsoft Visual C++ is install for your system. Remember that x86 is 32-bit and X64 is 64-bit system.  Note the information about closing Skype and to disable IIS server if installed on your system.  For Skype you may running into an issue with Skype using port 80 and need to disable that setting within Skype.  In my case I do not run Skype nor IIS server.

Destination Location WAMP Install
Location WAMP Install

You do not need to change the destination! Select NEXT

Start Menu Folder
Start Menu Folder

Leave start menu as is and select NEXT.

Ready to Install
Ready to Install

At this point you are ready to install WAMP select Install!

WAMP Installing
WAMP Installing

Decision time, do you want to use iExplore as your browser or another browser? I am a big fan of Chrome, so I selected NO so I can select the path to Chrome. Interesting but no surprise to me that it ignored my selection.  If you select Yes, you will be taken to the next window. If you selected NO, then you will need to browser, starting at C: to the path for Chrome or Firefox.

Another decision to make. By default, WampServer wants to use notepad as text editor. In my case I am good with using notepad, but I have and use Notepad ++ as my test editor, so I selected NO. You will be asked to select the correct path to the text editor. In my case it was C:\Program Files (x86)\Notepad++.

Next step is to launch phpMyAdmin which is a free open-source admin tool used with MySQL.  Select next at this point.  In the next window select Finish.

Last Step install
Last Step install

Message that reads you completed the setup wizard of Wampserver64 will appear.

 

WAMPServer Install Completed
WAMPServer Install Completed

In order to see that you were successful in installing WAMP you need to select the Wampserver icon that now appears on your desktop. Once the server is started this menu will appear on the task bar in the lower right corner as shown. Be sure to select the up arrow and select the green icon. Also notice that you can start, stop and retart the server from this menu. Green icon indicates started, red icon indicates off or stopped and yellow icon indicates issue or restarting, Testing each at this point is good indicates server is working properly.

What is the next step? The next step is to bring up phpMyAdmin to create test database. After that is completed we will need to download and install WordPress.

Related link to PHP: https://cit101blog.wordpress.com/2018/05/25/cannot-get-the-php-to-display-using-wamp/

 

Advertisements

After installing WAMP let’s create test database in MySQL

After installing WAMP let’s create test database in MySQL for WordPress.

To do this let’s go into phpMyAdmin. Remember from the first step we completed, ” Installing WAMP on your computer to run WordPress ” in order for  you to see the menu to select phpMyadmin you need to start WAMPServer by clicking on the icon on your desktop.  Once the server is started this menu will appear on the task bar in the lower right corner as shown.

 

The following browser page will appear. Note the path is http://localhost/phpmyadmin/

How you should see login for username and password as shown.

 

The default username is root, and remember the password is left blank to login. If during setup you created a password you will need to use that password. At later time I will create document for steps taken to change the password. Go ahead and select Go.

Now you should be in phpMyAdmin, select the Database tab. The following is what you should see at this point.

Where it reads Create database enter test_db and hit the Create button.

Now this is all you need to do at this point. Remember our goal is to get WordPress up and running on our local computer, we will come back and play around with the test_db on later date. For now, let’s get WordPress installed.

Download and installing WordPress on local computer

What is the next step?

The first step was installing WAMP on our computer, then we install MySQL bringing up phpMyAdmin to create test database. After that was completed we will need to download and install WordPress.

Now we can go ahead and download a copy of WordPress from WordPress.org. Once it has downloaded extract the zip file and copy the WordPress folder to C:\wamp64\www . Remember I had 64 bit system so your path may read different then what if shown.

Goal here is to get the WordPress downloaded and unzip the files, then copy the wordpress folder into C:\wamp64\www . As shown below

Now open a browser and enter the following URL, http://localhost/wordpress and hit enter. Your WordPress page should appear with the option to pick language, then select continue.  You should see the following message.

In the next screen only change the Database name to test_db, then Username to root and leave the password blank, leave Database Host localhost and leave the Table Prefix to wp_

Hit the submit button and in the next screen hit Run the Installation button.

Next screen, enter the following information Site Title, Username, NOTE the password or create a strong password, add your email address. Now selected the box Discourage search engines from indexing this site. Remember I created this WordPress on my local computer to work on a WordPress project that will take some time to complete. Once you have completed the fields hit the Install WordPress button.

Once you have completed the install you should get login screen and go right into WordPress. The URL should read //localhost/wordpress/wp-admin/..

Installing Apache2 Server, MySQL DB, and PHP on Ubuntu 14.04

First thing we need to do is run updates, so login as root.

sudo apt-get update

Second step is to install apache2

sudo apt-get install apache2

Test apache2 server

To see if apache2 was successfully installed

Open web browser and type in 127.0.01

Note to view IP address and local loop back address run ifconfig

You should see Apache2 Ubuntu Default Page

“It Works!”

This maybe the best time to go over with you stopping, reload, and starting apache2 server.

NOTE

To start, reload or stop apache2 server.

There are couple different methods to doing this. I like and want my students to use;

sudo service apache2 stop

sudo service apache2 start

sudo service apache2 reload

Note this is different for other OS so you should look up those methods that work for you Linux OS.

Third Step is to install MySQL Server

sudo apt-get install mysql-server

Now run this mysql_secure_installation which is a program step to create root password and remove or keep the test database.

It will ask you for your root password. THEN ask you to set a root password into MYSQL! SAYING N to keep the current root password or Y to change the password.  I recommend that my students take No.

Next question is to Remove anonymous users? I always select Yes.

Next question is to Disallow root login remotely? For class, NO.

However, in working environment this maybe yes or no, you need to confirm with your company IT Directors or Admin.

Remove test database and access to it?  (Again, for my students in my class let’s remove the mark this one as YES.)

Next question Reload privilege tables now? Here we want to say YES.

Note the message reads, Reloading the privilege tables will ensure that all changes made so far will take effect immediately.

After taking Yes you should see a message for …Success! Follow up by Cleaning up….

Forth Step install PHP

sudo apt-get install php5 libapache2-mod-php5

By default, the web site directory path is /var/www/html

With that in mind, create and save info.php to html  

To do this open and create new document

<?php

phpinfo();

<?

Note to create this you can use Web Editor such as Bluefish or use vi editor

vi   /var/www/html/info.php

Remember to save it to the html directory as info.php (not info.php.php)

Now to test it and see if PHP is working

Go to http://yourserveripaddress/info.php

This is what you should see:

What if it fails to work!

You may be getting a message that you don’t have permission to the directory var/www

You can see the permission of /var/www has, by this command ls -l /var/www. You will see like this (this only for example): (That’s Lower Case L not 1.)

Again, If there is a permission issue when trying to view the info.php complete the following:

Run ls -l /var/www to view who currently has rights to that directory.

To add yourself as having rights to that directory do the following:

sudo adduser yourusername www-data

After you completed this task you need to give yourself  “R“  rights permission and ownership to  your name.

sudo chown yourusername:www-data -R /var/www

 How to install Bluefish Web Editor Ubuntu 14.04

Related link: https://cit101blog.wordpress.com/2018/05/25/cannot-get-the-php-to-display-using-wamp/