At this time, WordPress is the most popular CMS (content management system) on the internet. It allows you to easily set up flexible blogs and websites on top of a MySQL backend with PHP processing. WordPress has seen incredible adoption and is a great choice for getting a website up and running quickly.

In this guide, we’ll focus on getting a WordPress instance set up with an Apache web server on Ubuntu 16.04 or later.

Before you begin this guide, there are some important steps that you need to complete on your server.

Additionally, you’ll need to have a LAMP (Linux, Apache, MySQL, and PHP) stack installed on your VPS instance. If you don’t have these components already installed and configured, you can use this guide to learn INSTALL LAMP.

WP represent as WordPress.

Step One — Create a MySQL Database

The first step that we will take is a preparatory one. WP uses a relational database to manage and store site and user information.

We have MySQL installed, which can provide this functionality, but we need to make a database and a user for WP to work with.

To get started, log into the MySQL root (administrative) account by issuing this command:

You will be prompted for the password you set for the MySQL root account when you installed the software. You will then be given a MySQL command prompt.

First, we can create a separate database that WP can control. You can call this whatever you would like, but I will be calling it wordpress because it is descriptive and simple. Enter this command to create the database:

We’re all set now. We can exit out of the MySQL prompt by typing:

Step Two — Download WP

Next, we will download the actual WP files from the project’s website.

Here, I have created one directory called WP so

Luckily, the WP team always links the most recent stable version of their software to the same URL, so we can get the most up-to-date version of WordPress by typing this:

This will download a compressed file that contains the archived directory contents of the WP files to our home directory.

We can extract the files to rebuild the WP directory we need by typing:

This will create a directory called wordpress in your home directory.

Step Three — Configure WordPress

Most of the configuration that we will be doing will be through a web interface later on. However, we do need to do some work from the command line before we can get this up and running.

Begin by moving into the WordPress directory that you just unpacked:

No need to create file (wp-config.php) or update key in it. wordpress automatically create wp-config.php file during web interface.

Step Four — Create Virtual Host

You can use THIS guide to create virtual host for our wordpress project.

Step Five — Complete Installation through the Web Interface

Now that you have your files in place and your software is configured, you can complete the installation through the web interface.

In your web browser, navigate to your server’s domain name or public IP address:

NOTE : i have configure my domain name in hosts file as

You will see the WordPress initial configuration page, where you will create an initial administrator account:

After click on Let’s go button next screen will come and it’s look like this:

Fill all the information.

After clicked on Submit button it will create wp-config.php file in your directory. Next screen  :

Fill out the information for the site and the administrative account you wish to make. When you are finished, click on the install button at the bottom.

WordPress will confirm the installation, and then ask you to log in with the account you just created:

Hit the button at the bottom and then fill out your account information:

You will be presented with the WordPress interface:

After all this set permalinks and create .htaccess file in your directory.

NOTE : give 777 user rights to .htaccess file.

You should now have a WordPress instance up and running on your Ubuntu.

Happy Codding !!!


What Others Are Reading

One thought on “How to Install WordPress 4.9.1 on Ubuntu Using LAMP Stack”

Leave a Reply

Your email address will not be published. Required fields are marked *