1-Click Install OLS, PHP, MySQL, WP and LSCache

How Can We Help?
< Back
You are here:

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

  • User Permission:
    • ols1clk be run with superuser access, You can either switch to the super user (root) with the su command or (you may run it as root or use the sudo command). 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] …
--adminuser [USERNAME]To set the WebAdmin username for OpenLiteSpeed instead of admin.
-A--adminpassword [PASSWORD]To set the WebAdmin password for OpenLiteSpeed instead of using a random one.
--adminport [PORTNUMBER]To set the WebAdmin console port number instead of 7080.
-E--email [EMAIL]To set the administrator email.
--lsphp [VERSION]To set the LSPHP version, such as 82. We currently support versions ’71 72 73 74 80 81 82′.
--mariadbver [VERSION]To set MariaDB version, such as 10.9. We currently support versions ‘10.2 10.3 …10.11’.
-W--wordpressTo install WordPress. You will still need to complete the WordPress setup by browser
--wordpressplus [SITEDOMAIN]To install, set up, and configure WordPress, also LSCache will be enabled
--wordpresspath [WP_PATH]To specify a location for the new WordPress installation or use for an existing WordPress.
-R--dbrootpassword [PASSWORD]To set the database root password instead of using a random one.
--dbname [DATABASENAME]To set the database name to be used by WordPress.
--dbuser [DBUSERNAME]To set the WordPress username in the database.
--dbpassword [PASSWORD]To set the WordPress table password in MySQL instead of using a random one.
--prefix [PREFIXNAME]To set the WordPress table prefix.
--listenport [PORT]To set the HTTP server listener port, default is 80.
--ssllistenport [PORT]To set the HTTPS server listener port, default is 443.
--wpuser [WP_USER]To set the WordPress admin user for WordPress dashboard login. Default value is wpuser.
--wppassword [PASSWORD]To set the WordPress admin user password for WordPress dashboard login.
--wplang [WP_LANGUAGE]To set the WordPress language. Default value is “en_US” for English.
--sitetitle [WP_TITLE]To set the WordPress site title. Default value is mySite.
--pure-mariadbTo install OpenLiteSpeed and MariaDB.
--pure-mysqlTo install OpenLiteSpeed and MySQL.
--pure-perconaTo install OpenLiteSpeed and Percona.
--with-mysqlTo install OpenLiteSpeed/App with MySQL.
--with-perconaTo install OpenLiteSpeed/App with Percona.
--proxy-rTo set a proxy with rewrite type.
--proxy-cTo set a proxy with config type.
-U--uninstallTo uninstall OpenLiteSpeed and remove installation directory.
-P--purgeallTo uninstall OpenLiteSpeed, remove installation directory, and purge all data in MySQL.
-Q--quietTo use quiet mode, won’t prompt to input anything.
-V--versionTo display the script version information.
-v--verboseTo display more messages during the installation.
--updateTo update ols1clk from github.
-H--helpTo display help messages.


./ols1clk.shTo install OpenLiteSpeed with a random WebAdmin password.
./ols1clk.sh --lsphp 80 To install OpenLiteSpeed with lsphp80.
./ols1clk.sh -A 123456 -e a@cc.comTo install OpenLiteSpeed with WebAdmin password “123456” and email a@cc.com.
./ols1clk.sh -R 123456 -W To install OpenLiteSpeed with WordPress and MySQL root password “123456”.
./ols1clk.sh --wordpressplus a.comTo 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: /usr/local/lsws/wordpress/

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 --wordpresspath option.

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. yum update


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 admin@example.com -f

Note: The -f option is to force https redirection