WordPress is a free and open-source CMS (content management system), which is widely used for making blogging websites. WordPress is basically the most famous CMS in the world because of its plugins which help most of the blogger to quickly start their blogging career. This makes WordPress a great choice for getting a website up and running quickly and easily.
So in this guide, we would demonstrate how to install WordPress on your server, with Apache and Mysql.
- A dedicated server or a VPS (Virtual Private Server ) with centos 7 minimal installation.
- Apache, MySql, and PHP should be installed on your server.
Step 1: Create a MySQL Database and User for WordPress
To get started login to Mysql with the root account.
# mysql -u root -p
It will prompt for the Mysql root password. After entering the password create a database using the command as follows:-
# CREATE DATABASE wordpress;
Next, we are going to create a new MySQL user account that we will use exclusively to operate on WordPress’s new database.
# CREATE USER [email protected] IDENTIFIED BY 'password';
Grant privileges to database
# GRANT ALL PRIVILEGES ON wordpress.* TO [email protected] IDENTIFIED BY 'password';
# FLUSH PRIVILEGES;
Once these commands have all been executed, we can exit out of the MySQL command prompt by typing:
Step 2:- Install WordPress
Go to /var/www/html directory using the following command
# cd /var/www/html
Now we are ready to download the latest WordPress:
# wget http://wordpress.org/latest.tar.gz
Next extract the WordPress archive
# tar -xvzf latest.tar.gz
Now you have all WordPress files on your /var/www/html directory (which is your apache hosting directory).
chown to grant ownership to Apache’s user and group:
# sudo chown -R apache:apache /var/www/html/*
Step 3:- Configure WordPress
Now go to /var/www/html directory where WordPress has been installed.
Open wp-config.php with your favourite text editor to change the database username and password which we have created on step 1.
These are the only values that you need to change, so save and close the file when you are finished.
Step 4:- Complete Installation Through the Web Interface
Now that you have your files in place and your software is configured, you can complete the WordPress installation through the web interface. In your web browser, navigate to your server’s domain name or public IP address:
First, you will need to select the language that you would like to install WordPress with. After selecting a language and clicking on Continue, you will be presented with the WordPress initial configuration page, where you will create an initial administrator account:
Fill the information for the site and administrative account.
WordPress will confirm the installation, and then ask you to log in with the account that you just created:
To continue, hit the Log in button at the bottom, then fill out your administrator account information:
After hitting the login button you will see the admin console as shown below:-
You can now start managing your WordPress website.
Now you successfully installed WordPress on your dedicated or a VPS (Virtual Private Server) Server. f you had any difficulties or questions, please submit them in the comment section below.
For WordPress hosting check out this URL:- https://www.siteground.com/index.htm?afcode=3cf92a080741ab7230fb1dff14712a0a