Help:Install:Quick Install WordPress

From OpenLiteSpeed
Jump to: navigation, search

The easiest way to install OpenLiteSpeed, WordPress, MySQL, and PHP is using our ols1clk script.

Otherwise, after you install OpenLiteSpeed, follow the instructions below to get your WordPress site working.

Install PHP modules

The easiest way to install PHP for OpenLiteSpeed (without ols1clk) is through our CentOS repository. If the LiteSpeed Repository was not installed and enabled during the web server installation, follow this guide to install and enable the LiteSpeed Repository.

Use the following command to install PHP with the modules required:

yum install lsphp55 lsphp55-common lsphp55-gd lsphp55-process lsphp55-mbstring lsphp55-mysql
Note: There are four versions of LSPHP (lsphp53, lsphp54, lsphp55, lsphp56) available.

Direct LSWS to the location of the installed PHP. (In this example, PHP 5.5 is installed by default in /usr/local/lsws/lsphp55/bin/lsphp. Change the value of the WebAdmin console > External App > your external application > Command setting to reflect that.)

If you are not using RedHat or CentOS, or you prefer to build PHP by yourself, see our instructions for building PHP for WordPress here.

Set up WordPress on a vhost

(Here we use the default virtual host "Example".)
Go to the WebAdmin Console > Virtual Hosts > Example > General > Index Files.
Add the following to the Index Files setting >
index.php

Download WordPress

Put WordPress in the virtual host document root: /usr/local/lsws/Example/html (This puts all the files in the right directory for running WordPress on the virtual host "Example".)
cd /usr/local/lsws/Example/html
wget http://wordpress.org/latest.zip
unzip latest.zip

Grant the web server user write permission to create wp-config.php during installation

chown nobody wordpress

Set up a MySQL database and user for WordPress

First, install MySQL:
yum install mysql mysql-server
Instructions for setting up the database can be found at http://codex.wordpress.org/Installing_WordPress#Using_the_MySQL_Client

Add a rewrite rule in the vhost to make permalinking work

(Here we use the default virtual host "Example".)
Go to the WebAdmin Console > Virtual Hosts > Example > General > Rewrite. Then change the following settings:
Enable Rewrite > Yes.
Rewrite Rules >
 
RewriteBase /wordpress/
RewriteRule ^/index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
"/wordpress" is the location WordPress was installed relative to the vhost docroot.

Graceful restart

So the changes will take effect (Actions > Graceful Restart).

Run the install script

Point your browser to http://server_ip:8088/wordpress/wp-admin/install.php

Set Up WordPress Caching (Optional)

Follow the steps described on this page to set up the LSCache for WordPress plugin: http://open.litespeedtech.com/mediawiki/index.php/Help:How_To_Set_Up_LSCache_For_WordPress