Install:Quick Install WordPress

From OpenLiteSpeed Wiki

Revision as of 22:46, 11 November 2014 by Marmstrong (talk | contribs)

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 is through our CentOS repository. If the LiteSpeed Repository was not installed and enabled during the web server installation, follow this guide to use the following command to install PHP 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 > Configuration > Virtual Hosts > Example > General > Index Files.
Add "index.php".

Download WordPress

Put WordPress in the virtual host document root: /usr/local/lsws/DEFAULT/html (This puts all the files in the right directory for running WordPress on the virtual host "Example".)
cd /usr/local/lsws/DEFAULT/html

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

Instructions can be found at

Add a rewrite rule in the vhost to make permalinking work

Go to the WebAdmin Console > Configuration > Virtual Hosts > Example > Rewrite.
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