Atlantic.Net Blog

How to Install WordPress on a CentOS 8 Server

Editorial Team
by Atlantic.Net (261 posts) under Tutorials, VPS Hosting
WordPress Illustration by Walker Cahall

WordPress Illustration by Walker Cahall

Verified and Tested 05/19/21


This how-to will show you how to install WordPress on CentOS 8. WordPress started as a blogging system, but now has become a full content management system (CMS). Since WordPress is a free open source program, it has become the most popular CMS on the Web. With thousands of plugins, your website is nearly limitless.


– To install WordPress, a CentOS 8 server running LAMP or LEMP is required.

Install WordPress on CentOS 8

To install WordPress, we are going to start off by setting up the database by running the following commands:

mysql -u root -p

When prompted, enter your MySQL root password that you set up when installing MySQL.

In MySQL, enter the following commands:

create database wordpress character set utf8 collate utf8_bin;

Make sure you set your own secure password where it says [insert-password-here]

grant all privileges on wordpress.* to [email protected] identified by '[insert-password-here]';
flush privileges;

Now that the database is created, we can download the latest version of WordPress with the following command:


Note: if wget is not installed, install it by running the command:

yum install wget

The latest package will download to the directory you are currently in, with the file name latest.tar.gz. We need to decompress the file by running:

tar -xzvf latest.tar.gz

Next, we need to copy wp-config-sample.php to wp-config.php which is where WordPress gets its base configuration. To do that run:

cp wordpress/wp-config-sample.php wordpress/wp-config.php

In your favorite text editor, edit wordpress/wp-config.php

For a basic setup, we need to have the following.

define(‘DB_NAME’, ‘wordpress’);

define(‘DB_USER’, ‘wordpressuser’);

define(‘DB_PASSWORD’, ‘[insert-password-here]’);

It should look like this when completed:




Next, we need to move the WordPress folder to your web directory.

sudo cp -r ~/wordpress/* /var/www/html

We now can go to the WordPress web installation. In your browser go to http://yourhostname-or-ipaddress

If you are unsure what you IP address is run the following:

Sample ifconfig


In our example, we would put in the address bar and get the following page.


Fill in your sites infromation, username, password and email addressa accordingly.

Welcome Page


From here all that is needed to do is to follow along with the WordPress install and give the information required. For more information, you may want to check out the WordPress Codex. offers VPS hosting as well as managed server hosting which include a layer of business-essential managed services to your hosting packages. Contact us today for more information.

Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year

Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

How to Create a Sudo User in Rocky Linux 8
How To Set Up SSH Public and Private Key in Linux
How to Kill Running Processes in Linux
How to Find the Total Size of a Directory in Linux
How to Install Latest Linux Kernel on Ubuntu 20.04

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year

New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2008 Lookout Dr,

Dallas, Texas 75044

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4


London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom