blog-logo

Build a WordPress website – Install WordPress (Vol 2)

Now our primary focus is on learning WordPress first, Therefore in this article we will Install WordPress on a local system.

There are several ways to install WordPress but we will choose the most less complicated way to work with.

Note : This is for beginners, eventually one will have to install WordPress on a hosted server directly but for that you will need a domain name and a hosting server where you will host your website. For now you don’t need to buy any of these as we will be using local system to host a demo website.

Pre-requisite :


XAMPP stands for cross-platform, Apache, MySQL, PHP and Perl. It’s a simple and lightweight solution that allows you to create a local web server for testing purposes. In-other words it will provide platform to render your website in browser by setting up adequate environment for it.

Download suitable XAMPP for your operating system (Windows/Linux/Mac) from here : https://www.apachefriends.org/download.html

Step 1 : Installing XAMPP

You will have to download XAMPP form above mentioned link the size of file will be 108MB approx. Once downloaded, launch the installer to install XAMPP.

Note : Make sure if you’ve antivirus installed on your system, Disable it for few minutes untill XAMPP is installed successfully.

The XAMPP setup wizard will guide you through the installation. Click Next

xampp-scr1

 

After that you’ll get options to select components to be installed as a part of XAMPP installation.

xammp-components

Let it be default and click next.( Apache & MySQL are crucial for WordPress installation hence make sure they are check before moving onto next step)

Note : If you don’t want to install Mail Server or Filezilla just uncheck it and click next

 

xampp-dest-fldr
Select Destination Folder or Directory

You can select the destination folder to install XAMPP, and proceed ‘Next >’

 

xampp-setupready
Click Next to start installation of XAMPP
xampp-progress
Installation Progress Window
firewall-access
Allow Firewall access

You might get a pop-up in Windows installation to allow Apache HTTP Server access through firewall(which is necessary), Allow the access and continue.

xampp-complete
When setup is completed click Next and then click Finish.

Now XAMPP is installed, It will now launch Control Panel automatically. If not you can search for ‘XAMPP Control Panel’.

xampp-controlpanel
XAMPP Control panel

Now normally you won’t find any errors, until your XAMPP installation does not clash with any other service installation.

Here in above picture there is an MySQL error which actually means that as I’ve already installed MySQL server installed manually XAMPP not is able to initialize its MySQL service as the port and configuration file is referring to some other service(Manually installed MySQL server in my case).

Solution :

  1. Go to Start, type in “services.msc” and select the best match
  2. Scroll down in the Services window to find MySQL or MySQL56
  3. Right click on it and select Stop
  4. This should free up port 3306. When you restart XAMPP it should run without errors

Similarly if you’re having problem with Apache Server which looks something like this :

apache-port-error
Apache HTTP server Port conflict error

Solution for that is :

  1. Go to Start, type in “services.msc” and select the best match
  2. Scroll down in the Services window to find World Wide Web Publishing Service
  3. Right click on it and select Stop
  4. This should free up port 80. When you restart XAMPP it should run without errors

If you find any other error please just ask in below comments section will help you solve it asap!

A error-less XAMPP Control Panel looks like this :

xampp-errorless-cntrolpanel
Xampp control panel without errors looks like this.

 

Next step :

Go ahead and ‘Start’  Apache and MySQL service from  XAMPP control panel.

xampp-start-service
Start Apache and MySQL services

You can check if its working on not by just typing : http://localhost in browser. It should open a page something like this..

localhost-default-pg
Localhost PAge will show default apache page

If you see the same page then your Apache server is running successfully.

Setup MySQL database :

Now you have to setup MySQL database to install WordPress.

Switch back to control panel and click on ‘Admin’ button to open ‘phpmyadmin’ panel in browser.

open-phpmyadmin
Click on Admin button to open phpmyadmin

 

phpmyadmin-page
PHPmyadmin page will look like this

 

Now Create database for WordPress :
create-db-wordpress
Go to Database tab, there input a database name and click create
Download WordPress setup :

Go to : https://wordpress.org/download/

Download wordpress setup, Next just unzip the folder and place it in htdocs directory where XAMPP is installed.

htdocs-wordpress
Put the folder into htdocs folder where xampp is installed.

Open the wordpress folder where you saved WordPress, find the wp-config-sample.php file and rename it wp-config.php. Open the file and scroll down until you see the following lines:

edit-wp-config
Replace the highlighted text

These lines of code define the login details for your database:

  • Replacedatabase_name_here with the name of your database, which in my case is “wordpress_database
  • Replaceusername_here with rootand leave password_hereblank
  • Save the file and close it

 

Well!  Your now ready to get started with WordPress!

Go to browser typehttp://localhost/wordpress

select-language-wp
Select your language and continue

 

welcome-page-wordpress
Welcome page! enter site name, username and password and click install wordpress

If everything is configured as mentioned above you’ll receive a success page .

wordpress-success-page
Go ahead login to dashboard
dashboard-wordpress
This is it! you’ve installed wordpress successfully
default-website
Go to visit site, you’ll see default website

That’s it! You can now explore the other options like customizing the website and all.

Note : Everytime to turn off/on your system you’ll need to start Apache and MySQL from XAMPP Control Panel then only you’ll be able to open in your wordpress dashboard in browser

You can open site by typing http://localhost/wordpress/.

Things to expect from next blog : Exploring WordPress Dashboard.

Thank you for reading! 🙂

If any queries or doubts please write to : contact@bhargavamin.com or comment below.