Blog / Others/ OpenLiteSpeed One-Click Install Script: Quick WordPress Deployment with LSCache

OpenLiteSpeed One-Click Install Script: Quick WordPress Deployment with LSCache

OpenLiteSpeed 一键安装脚本:快速部署 WordPress 与 LSCache

Introduction to the OpenLiteSpeed One-Click Install Script

This official script from LiteSpeed Technologies enables rapid deployment of a complete WordPress environment on supported Linux distributions with a single command. The environment includes the OpenLiteSpeed web server, a specified PHP version, a MariaDB/MySQL database, and optionally, the latest WordPress installation with the dedicated LiteSpeed Cache (LSCache) plugin.

System Requirements

  • Operating System: 64-bit system.
  • Supported Distributions:
    • CentOS 6, 7
    • Debian 7, 8, 9, 10
    • Ubuntu 14.04, 16.04, 18.04

Note: Some older distributions (e.g., CentOS 6, Debian 7, Ubuntu 14.04) have reached end-of-life. For new projects, use a more recent distribution for better security and compatibility.

Installation and Usage

Download the Script

Download the official one-click installation script using the following command:

wget --no-check-certificate https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh

Core Command and Parameters

The basic command format is:

bash ols1clk.sh -a <admin-password> -e <admin-email> --lsphp <php-version> -r <db-root-password> --dbname <database-name> --dbuser <database-user> --dbpassword <database-password> -w --wpuser <wp-username> --wppassword <wp-password> --wplang <wp-language-code> --sitetitle <site-title> --wordpressplus <domain> --wordpresspath <installation-path>

Key Parameter Explanation:

  • -a: Super administrator password for the OpenLiteSpeed admin panel.
  • -e: Administrator contact email.
  • --lsphp: Specify the PHP version (e.g., '74' for PHP 7.4). Supported versions may change; refer to the official repository for the latest list.
  • -w: Enable this flag to automatically install the latest WordPress and the LSCache plugin.
  • --wplang: Set the WordPress site language (e.g., zh_CN for Simplified Chinese).

Common Usage Examples

1. Minimal Installation (Environment Only)
Install the base environment (OpenLiteSpeed, MariaDB, PHP) with randomly generated passwords:

bash ols1clk.sh

2. Full Installation (Environment + WordPress)
Install the complete environment and automatically deploy WordPress with the LSCache plugin:

bash ols1clk.sh -w

You can also use a single curl command to run it directly:

bash <( curl -k https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh ) -w

3. Management Commands

  • View Help: bash ols1clk.sh --help or bash ols1clk.sh -h
  • View Version: bash ols1clk.sh -v
  • Complete Uninstall: bash ols1clk.sh --purgeall (This will remove all installed software and related directories. Use with caution.)

WordPress Language Code Reference

Below are some common language codes. For a complete list, refer to the script's help or the official WordPress documentation.

Language (English) Language Code
Chinese (China) zh_CN
Chinese (Taiwan) zh_TW
English (US) en_US
Japanese ja
Korean ko_KR
Spanish (Spain) es_ES
French (France) fr_FR
German de_DE
Russian ru_RU
Vietnamese vi

Important Notes and Best Practices

  1. Security First: In production, always use strong passwords. Avoid leaving --dbpassword empty (it will auto-generate). After installation, promptly record all password information output by the script.
  2. Domain and Path: When using --wordpressplus and --wordpresspath, ensure the path is correct and the domain is properly resolved to your server's IP address.
  3. Version Updates: The one-click script and the software it installs are updated regularly. Before execution, visit the official GitHub repository to check for the latest documentation and parameter changes.
  4. Firewall: After installation, ensure your firewall allows traffic on HTTP (80), HTTPS (443), and the OpenLiteSpeed admin panel (default port 7080).

Post a Comment

Your email will not be published. Required fields are marked with *.