You can install OpenLiteSpeed, LSPHP, MariaDB, WordPress, and LiteSpeed Cache plugin for WordPress in 1-click!
ols1clk is a one-click installation script for OpenLiteSpeed. Using this script, you can quickly and easily install OpenLiteSpeed with its default settings, Using different parameters for example,
./ols1clk.sh -w you can install WordPress files and MySQL database associated with it, along with LiteSpeed Cache Plugin for WordPress at the same time.
Currently one-click installation only supports Centos(6-9), Debian(7-11) and Ubuntu(14,16,18,20,22) with 64 bits platforms
- Operating System:
- User Permission:
ols1clkbe run with superuser access, You can either switch to the super user (root) with the
sucommand or (you may run it as root or use the
sudocommand). How you do this will depend upon which distribution you use. Some distributions enable the root user (such as CentOS), while some do not (such as Ubuntu and Debian).
- Run the following in the command line:
wget https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh && bash ols1clk.sh
- Run the following in the command line:
bash <( curl -k https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh )
- The above methods will install OpenLiteSpeed and lsphp module.
- To install WordPress and (if not already present) along with MySQL database, along with LiteSpeed Cache Plugin for WordPress, run
bash <( curl -k https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh ) -w
- Answer any prompts within the script and you’re done!
./ols1clk.sh [options] [options] …
|To set the WebAdmin username for OpenLiteSpeed instead of admin.|
|To set the WebAdmin password for OpenLiteSpeed instead of using a random one.|
|To set the WebAdmin console port number instead of 7080.|
|To set the administrator email.|
|To set the LSPHP version, such as 82. We currently support versions ’71 72 73 74 80 81 82′.|
|To set MariaDB version, such as 10.9. We currently support versions ‘10.2 10.3 …10.11’.|
|To install WordPress. You will still need to complete the WordPress setup by browser|
|To install, set up, and configure WordPress, also LSCache will be enabled|
|To specify a location for the new WordPress installation or use for an existing WordPress.|
|To set the database root password instead of using a random one.|
|To set the database name to be used by WordPress.|
|To set the WordPress username in the database.|
|To set the WordPress table password in MySQL instead of using a random one.|
|To set the WordPress table prefix.|
|To set the HTTP server listener port, default is 80.|
|To set the HTTPS server listener port, default is 443.|
|To set the WordPress admin user for WordPress dashboard login. Default value is wpuser.|
|To set the WordPress admin user password for WordPress dashboard login.|
|To set the WordPress language. Default value is “en_US” for English.|
|To set the WordPress site title. Default value is mySite.|
|To install OpenLiteSpeed and MariaDB.|
|To install OpenLiteSpeed and MySQL.|
|To install OpenLiteSpeed and Percona.|
|To install OpenLiteSpeed/App with MySQL.|
|To install OpenLiteSpeed/App with Percona.|
|To set a proxy with rewrite type.|
|To set a proxy with config type.|
|To uninstall OpenLiteSpeed and remove installation directory.|
|To uninstall OpenLiteSpeed, remove installation directory, and purge all data in MySQL.|
|To use quiet mode, won’t prompt to input anything.|
|To display the script version information.|
|To display more messages during the installation.|
|To update ols1clk from github.|
|To display help messages.|
|To install OpenLiteSpeed with a random WebAdmin password.|
|To install OpenLiteSpeed with lsphp80.|
|To install OpenLiteSpeed with WebAdmin password “123456” and email firstname.lastname@example.org.|
|To install OpenLiteSpeed with WordPress and MySQL root password “123456”.|
|To install OpenLiteSpeed with a fully configured WordPress installation at “a.com”.|
Why should I use ols1clk (1-Click Install) Script?
If you are trying to install WordPress on your own machine and have no idea where to start, this is your one stop shop! This will install the web server, and optionally MySQL and WordPress as well, giving you a running start. After the script finishes, you can get straight to configuring the web server or jump right into setting up WordPress.
Do I need super user access?
Yes, you need root access to use the script. You may use a super user account, or you may use
sudo as well.
Where is OLS installed to?
Where is WordPress installed?
By default, WordPress is installed to:
What PHP version is installed?
The latest version from our repositories. Currently, it is version 8.1
I tried installing OLS once and it threw a bunch of text at me saying there was an error!
This one-click install script should automatically install any dependencies you are missing.
Can I use it for my existing WordPress installation?
Yes! All you need to do is point the script to the installation path using the
Will it break my existing WordPress installation?
Open LiteSpeed cannot read
.htaccess files. However, this script will parse your
.htaccess file and try to extract the relevant rewrite rules. Depending on how complex the file is, there may be issues in the conversion.
What happens when there is an OLS update?
The Web Admin says there is an update for OLS! The script installs using your OS’s package manager. Just run an update in the package manager to update your installation. e.g.
How do I create additional Virtual Hosts from console?
Run the following command to create an additional virtual host in a few seconds. The example document root will be /var/www/www.example.com. Be sure to substitute your own domain.
/bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh ) -d www.example.com
How do I create additional Virtual Hosts with WordPress from the console?
Then run the following command to create an additional virtual host with WordPress.
/bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh ) -d www.example.com -w
How do I create additional Virtual Hosts and LE certificate from console?
Please be sure that your domain is already pointing to the server.
Then run the following command to create an additional virtual host with a Let’s Encrypt certificate applied. Be sure to substitute your own domain and your email address.
/bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh ) -d www.example.com -le email@example.com -f
-f option is to force https redirection