Installing WordPress on Ubuntu 17.10

WordPress is the world’s most popular blogging and website management platform. It’s a free and open-source content management system that is based on PHP and MySQL database. It was released on May 27th, 2003, and accounts for 59.4% of the market share today trouncing its competitors like Drupal and Joomla and powering over 60 million websites according to Wikipedia. As its popularity increased and still on the rise to date, some of the World’s major brands have tapped into the magic of the CMS and are hosted on the platform. Some of the notable global websites riding on WordPress include:

  1. Usain bolt (Yup, the greatest runner of all times)
  2. Sony Music
  3. Bata
  4. New York Post
  5. Katy Perry
  6. In style
  7. TED

So, what makes WordPress so popular with millions of people around the globe? Let’s discover.

It’s easy to use

It comes with an easy to use and intuitive dashboard with built-in blogging features, plugins and much more that can help beginners get started on their blog or website without knowledge on web programming languages like PHP, HTML and CSS. All these come bundled together in the CMS itself and templates which are easily customizable with a simple click and drag and drop features.

It’s cost-effective

Gone are the days you’d take ages designing a website or hiring a web designer to do it for you. Thanks to WordPress you can create a powerful and responsive website in a matter of hours. Moreover, it’s much easier to update your content as all you do is to log in via the WP dashboard and create/edit your post.

It’s easily scalable

WordPress comes replete with plugins that enhance its functionality. Popular plugins include social media icons plugins that enable users to share content on social media sites, and Newsletter Sign Up plugins that allow users to subscribe to your blog’s periodic Newsletters. Templates also come with different layouts that are easily customizable to your preferred style without any code editing.

WordPress is SEO Ready

WordPress is built using a clean, well-structured, and consistent code that makes it easily indexable by Google and other search engines thereby making your site rank higher. As a user, you can decide which pages rank higher or alternatively use SEO plugins like the popular Yoast plugin which enhances your site’s ranking on Google.

WordPress sites are Responsive

Since the advent of smartphones, tablets, and other devices that connect to the internet, there’s been a growing need to have websites fit properly across multiple platforms. With WordPress, rest assured that your site will be responsive. Another added benefit of responsiveness is that Google ranks SEO websites higher than those which aren’t. Another SEO benefit right there!

For WordPress to function, it needs to be installed on a web server either hosted locally on an internal network or on an online platform like cPanel.

That said, let’s have a look at how we can install the WordPress platform on a Debian 9 System.

Prerequisite

Before getting started, You need to have an instance on Ubuntu 17.10. You can deploy a Cloud Server instance or fully managed  VPS  from CloudCone starting at just $3.71.

 

Installation of WordPress

Login as root user to your Ubuntu 17.10 and open the terminal.

Update the system to update the repositories

apt-get update

wordpress apt-get update

Since WordPress is based on PHP and MySQL, we need to install a web server.

Install lamp server as our Web server

apt-get install lamp-server^

apt-get install lamp-server^

This will take a couple of minutes and present you with a GUI where you’ll be required to provide the MySQL password and confirm.

wordpress lamp-server mysql passwd

Confirm password.

wordpress lamp-server mysql passwd2

WordPress Initialization

mysql -u root -p

wordpress mysql -u root -p

Provide the password and hit Enter

Create WordPress database

CREATE DATABASE wordpressdb;

wordpress create wordpress-db

Create a WordPress User

CREATE USER wpuser@localhost IDENTIFIED BY ‘wp-passwd’;

create wordpress user

Grant privileges to the user

GRANT PRIVILEGES ON wordpressdb.* TO wpuser@localhost

wordpress GRANT PRIVILEGES

FLUSH PRIVILEGES
wordpress FLUSH PRIVILEGES

Exit

Go to your temp directory and download the latest WordPress File

wget https://wordpress.org/latest.tar.gz

Uncompress the tarball

tar -xvf latest.tar.gz

Copy the entire uncompressed folder to /var/www/html/ path

cp -R wordpress /var/www/html/

Run the command below to change ownership of WordPress directory

chown www-data:www-data /var/www/html/wordpress/

change File permissions

chmod -R 755 /var/www/html/wordpress/

Make 2 subdirectories recursively

mkdir -p /var/www/html/wordpress/wp-content/uploads

Finally, change permissions of uploads folder

chown -R www-data:www-data /var/www/html/wordpress/wp-content/uploads

Open your browser and go to the server’s url. In my case it’s

http://10.200.21.89/wordpress

you’ll be presented with a WordPress wizard. Choose your preferred language and hit ‘Continue’

wordpress wizard

A summary of the credentials required will be displayed. Hit ‘Let’s Go!’

wordpress wizard summary

Fill out the form accordingly. Leave out the database host and table prefix.
Hit ‘Submit’

wordpress wizard credentials
If all goes well, you should get this!

wordpress sparky

Run the installation.

Fill out the credentials and save them somewhere safe in case you forget. Make sure to use a strong password.

wordpress wizard credentials

Hit Install WordPress.

wordpress install

Provide your login details like you specified earlier on and Click login

wordpress login

Voila! there goes the WordPress dashboard that you can use to create your first blog or website !

wordpress dashboard

About James

Hey there! This is James, a Linux administrator and a tech enthusiast. I love experimenting with various distributions of Linux and keeping tabs on what's new in the Linux world.
Deploy a managed hourly billed Cloud Server!
Read More