![]() |
Installing WordPress on CentOS 7 - Printable Version +- Post4VPS Forum | Free VPS Provider (https://post4vps.com) +-- Forum: VPS Discussion (https://post4vps.com/Forum-VPS-Discussion) +--- Forum: Tutorials (https://post4vps.com/Forum-Tutorials) +--- Thread: Installing WordPress on CentOS 7 (/Thread-Installing-WordPress-on-CentOS-7) |
Installing WordPress on CentOS 7 - Manal - 09-06-2019 Hey! 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 1 - Installing 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. Code: mysql -u root -p Now when inside MySQL terminal, use the following commands to create user & database and assign proper permissions to each other. Code: mysql> CREATE DATABASE wordpress; 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. Code: 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. Code: wget http://wordpress.org/latest.zip Code: chown -R apache:apache /var/www/html/wordpress Now head over to WP's directory. Code: 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. Code: 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. Code: 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). Code: // ** MySQL settings - You can get this info from your web host ** // 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.) |