Actions

Help

Difference between revisions of "Install:Quick Install WordPress"

From OpenLiteSpeed Wiki

m (Removed Help Category.)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Help]]
+
The easiest way to install OpenLiteSpeed, WordPress, MySQL, and PHP is using our '''[[Help:1-Click_Install|ols1clk script]]'''.
After you install OpenLiteSpeed, follow the instructions below to get your WordPress site working.
+
 
 +
Otherwise, after you install OpenLiteSpeed, follow the instructions below to get your WordPress site working.
  
 
==== Install PHP modules ====
 
==== 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 [http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:php:rpm this guide] to install and enable the LiteSpeed Repository.
+
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 [http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:php:rpm this guide] to install and enable the LiteSpeed Repository.
  
 
Use the following command to install PHP with the modules required:
 
Use the following command to install PHP with the modules required:
Line 19: Line 20:
  
 
: (Here we use the default virtual host "Example".)
 
: (Here we use the default virtual host "Example".)
: Go to the WebAdmin Console > Configuration > Virtual Hosts > Example > General > Index Files.
+
: Go to the WebAdmin Console > Virtual Hosts > Example > General > Index Files.
: Add "index.php".
+
: Add the following to the Index Files setting >
 +
<blockquote><code>index.php</code></blockquote>
  
 
==== Download WordPress ====
 
==== 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".)
+
: 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".)
  
 
<blockquote><pre>
 
<blockquote><pre>
cd /usr/local/lsws/DEFAULT/html
+
cd /usr/local/lsws/Example/html
 
wget http://wordpress.org/latest.zip
 
wget http://wordpress.org/latest.zip
 
unzip latest.zip
 
unzip latest.zip
Line 37: Line 39:
 
==== Set up a MySQL database and user for WordPress ====
 
==== Set up a MySQL database and user for WordPress ====
  
: Instructions can be found at http://codex.wordpress.org/Installing_WordPress#Detailed_Instructions
+
: First, install MySQL:
 +
 
 +
<blockquote><code>yum install mysql mysql-server</code></blockquote>
 +
 
 +
: 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 ====
 
==== Add a rewrite rule in the vhost to make permalinking work ====
  
: Go to the WebAdmin Console > Configuration > Virtual Hosts > Example > Rewrite.  
+
: (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.
 
: Enable Rewrite > Yes.
 
: Rewrite Rules >
 
: Rewrite Rules >
Line 59: Line 66:
  
 
==== Run the install script ====
 
==== Run the install script ====
 +
: Point your browser to http://server_ip:8088/wordpress/wp-admin/install.php
  
: 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

Latest revision as of 22:11, 13 December 2017

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