How To Install WordPress with OpenLiteSpeed on CentOS 7
To Install WordPress with OpenLiteSpeed on CentOS 7
WordPress is currently the most popular content management system (CMS) in the world. It allows you to easily set up flexible blogs and websites on top of a database backend, using PHP to execute scripts and process dynamic content. WordPress has a large online community for support and is a great way to get websites up and running quickly.
To install the Openlitespeed web server in CentOS 7 visit,
https://www.linuxhelp.com/how-to-install-the-openlitespeed-web-server-on-centos-7/
To create Database
Create a Database and Database User for WordPress
[root@linuxhelp1 ~]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with or g. Your MariaDB connection id is 11 Server version: 5.5.47-MariaDB MariaDB Server Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type ' help ' or ' h' for help. Type ' c' to clear the current input statement. MariaDB [(none)]> Now create a database in the name of wordpress MariaDB [(none)]> create database wordpress Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> grant all on wordpress.* to user1@localhost identified by ' linuxc' Query OK, 0 rows affected (0.05 sec) MariaDB [(none)]> flush privileges Query OK, 0 rows affected (0.02 sec) MariaDB [(none)]> exit Bye
To Configure Virtual Host
Configure the Virtual Host for WordPress
Open the browser and navigate to https:/< IP_Address> :7080
Select " Virtual Hosts" from the menu bar.
Select the " Example" virtual host, and click the general tab.
Click the " Edit" to change the configuration.
Allow index.php
To start and enable index.php files and then Click " Save" .
To set up the rewrite instructions click on " Rewrite" tab for the virtual host.
Select " Yes" in " Enable Rewrite" option and click save.
Click on the " Edit" button to rewrite rules.
Remove Unused Password Protection
Click on the " Security" tab, and then trigger the " Delete" button.
Click on the " Context" tab. In the " Context List" , delete the /protected/ context that was associated with the security realm you just deleted:
Restart the Server to apply the Changes
Clean up our virtual host and document root directories as shown below.
[root@linuxhelp1 ~]# cd /usr/local/lsws/Example/
Now delete the cgi-bin and fsci-bin by using the following command.
[root@linuxhelp1 Example]# rm -rf cgi-bin fcgi-bin
Clear the contents of our document root directory.
[root@linuxhelp1 Example]# rm -rf html/*
Install and Configure WordPress
Download and install WordPress by running the following command.
[root@linuxhelp1 ~]# wget https://wordpress.org/latest.tar.gz
--2016-07-11 12:12:25-- https://wordpress.org/latest.tar.gz
Resolving wordpress.org (wordpress.org)... 66.155.40.250, 66.155.40.249
Connecting to wordpress.org (wordpress.org)|66.155.40.250|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7773389 (7.4M) [application/octet-stream]
Saving to: ‘ latest.tar.gz’
100%[========================================================================> ] 77,73,389 459KB/s in 15s
2016-07-11 12:12:41 (519 KB/s) - ‘ latest.tar.gz’ saved [7773389/7773389]
Extract the downloaded word press directory.
[root@linuxhelp1 ~]# tar xzvf latest.tar.gz
wordpress/
wordpress/wp-settings.php
wordpress/wp-cron.php
wordpress/wp-comments-post.php
.
.
.
wordpress/wp-includes/update.php
wordpress/wp-includes/comment.php
wordpress/wp-config-sample.php
[root@linuxhelp1 ~]# cd wordpress/
Rename the WordPress configuration file.
[root@linuxhelp1 wordpress]# cp wp-config-sample.php wp-config.php
Open the configuration file.
[root@linuxhelp1 wordpress]# vim wp-config.php
Then add the following database credentials.
// ** 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' , ' user1' ) /** MySQL database password */ define(' DB_PASSWORD' , ' linuxc' )
Copy the files into the root directory.
[root@linuxhelp1 wordpress]# cp -r ~/wordpress/* /usr/local/lsws/Example/html/
Set permission for the entire directory.
[root@linuxhelp1 wordpress]# chown -R nobody:nobody /usr/local/lsws/Example/html/
Now open the browser and navigate to https://< IP_ address> : 8088
Choose your desired language.
Fill the following details and click Install WordPress.
Now you can Login into the WordPress.
sudo usermod -a -G nobody webrun_ftp
sudo chown -R webrun_ftp:webrun_ftp /home/abcd.com/html/
sudo chmod -R 0755 /home/abcd.com/html/
Getting permission issue. What will be issue??