Problems activating your account? Send notification email to: [email protected]
Host4Fun Budget VPS Hosting
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing WordPress on CentOS 7

In this thread, we're going to learn how to install WordPress on your CentOS 7 machine. To do so, login to your server with your credentials using Putty or any other SSH client and follow the steps.

Step 1Installing LAMP Stack

Most of us would already know what LAMP stack is, for those who don't, it means "Linux, Apache, MySQL & PHP". We must install them. Since it's an easy part, we'll skip. For those who don't know, they can follow up on the tutorial given at the end of the tutorial.

Step 2 - Creating MySQL Database & Configuring Proper permissions to it.
Before we start downloading and installing WordPress, we will need to create a MySQL database and configure it properly. To do so, login to your MySQL root user by using this command.

mysql -u root -p

Now when inside MySQL terminal, use the following commands to create user & database and assign proper permissions to each other. 
mysql> CREATE DATABASE wordpress;
mysql> GRANT ALL PRIVILEGES on wordpress.* to 'wpuser'@'localhost' identified by 'your_password';
mysql> exit

Note - Make sure 'wpuser' is edited with your desired username for WP's database username and 'wordpress' to be replaced as your desired name for the WP database. 
After configuring it, restart it.
systemctl restart mariadb

Step 3 - Downloading & Installing WordPress

Download and unzip WP package into the proper directory. After that, make 'uploads' directory as it is not created by default.
unzip -q -d /var/www/html/
mkdir -p /var/www/html/wordpress/wp-content/uploads
Assign proper permission to Apache to access WordPress directory and it's filed.

chown -R apache:apache /var/www/html/wordpress
chmod -R 755 /var/www/html/wordpress
chown -R :apache /var/www/html/wordpress/wp-content/uploads

Now head over to WP's directory.

cd /var/www/html/wordpress/

By default, the 'wp-config.php' is named as 'wp-config-sample.php'. To configure WordPress, we need to rename it to its original name. To do so, write the following command.
mv wp-config-sample.php wp-config.php

Now let's edit 'wp-config.php' and put values according to what we've set in step 2.

nano wp-config.php

Now edit it accordingly. We'll put the default values we've used to create the database(according to step 2).

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', 'wpuser');

/** MySQL database password */
define('DB_PASSWORD', 'your_password');

/** MySQL hostname */
define('DB_HOST', 'localhost');
To save the file, press CTRL + X and then press “y” and it will ask you if you really want to save. Press ‘Enter’. In short, ‘CTRL + X > press y > press Enter’ and saved! Make sure you scroll down with arrow key and find these line and edit it accordingly and don’t touch other lines unless you completely know what you’re doing or it may result in errors.

Step 4 - Installing WordPress

To install WordPress after configuring it, go to http://your_ip_address/wordpress/wp-admin/install.php (replace your_ip_address with your server’s IP) and continue with the steps that WordPress instructs and you shall be able to completely work the way out of installing WordPress.

Detailed Article link - Installing WordPress on CentOS 7

(Note - This article is solely my work and has been published on Shadow Hosting's blog. All credits go to Shadow Hosting accordingly.)
Premium Web Hosting | ShadowCrypt | Manal Shaikh Official Website
If you find my post/thread useful, you're supposed to +rep me. 

Possibly Related Threads...
Thread Author Replies Views Last Post
  How to perform GeekBench 5 CPU Benchmark on CentOS 7? sohamb03 1 144 07-22-2020, 07:46 AM
Last Post: Honey
  CentOS 7/8 with XFCE & XRDP Hidden Refuge 3 283 04-13-2020, 06:45 AM
Last Post: Hidden Refuge
  How to Change SSHD's Port The Right-Way In CentOS 8 fChk 3 265 04-12-2020, 02:44 PM
Last Post: OldMeister
  How to Set up Your Own DoH Server on CentOS 8 fChk 3 636 04-10-2020, 12:18 PM
Last Post: fChk
  CentOS 7 with XFCE & VNC Hidden Refuge 5 1,948 12-16-2019, 06:52 AM
Last Post: youssefbasha

Forum Jump:

Users browsing this thread: 1 Guest(s)

Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis

About Post4VPS

Post4VPS is a forum/destiny where you can Delploy Your Free VPSs just by the Power of Posts.

We Provide VPSs of many locations like Germany,US,Canada,France,London,etc.

We also Provide VPSs of Both Linux and Windows OS.