Loading...

Knowledge Base

Purchase a HostGator Self-Managed VPS with OpenLiteSpeed & WordPress Installation

Build and host a WordPress website with OpenLiteSpeed + WordPress, a combination of the OpenLiteSpeed web server and the WordPress content management system. OpenLiteSpeed can be configured to serve WordPress websites and supports features such as virtual hosts, HTTPS, rewrite rules, and LiteSpeed Cache. OpenLiteSpeed also works with the LiteSpeed Cache for WordPress plugin, enabling WordPress sites to take advantage of OpenLiteSpeed's built-in caching capabilities. Together, OpenLiteSpeed and WordPress provide an environment for creating, managing, and serving WordPress websites. With a Self-Managed VPS, you're responsible for configuring, maintaining, updating, and securing your server, your OpenLiteSpeed and WordPress installation, and the websites you host.

Key Benefits of OpenLiteSpeed + WordPress

OpenLiteSpeed + WordPress includes features designed specifically for hosting and serving WordPress websites.

  • WordPress Support: Install and run WordPress websites with OpenLiteSpeed using supported PHP and database components.
  • LiteSpeed Cache Support: Use the LiteSpeed Cache for WordPress plugin with OpenLiteSpeed to improve website performance through content caching.
  • WordPress Rewrite Support: Manage WordPress rewrite rules through OpenLiteSpeed's rewrite engine and .htaccess support.
  • Virtual Host Support: Configure separate virtual hosts for WordPress websites and map them to their respective domains.
  • HTTPS Support: Secure WordPress websites by configuring SSL certificates at the listener or virtual host level.
  • Web-Based Configuration: Use the OpenLiteSpeed WebAdmin Console to manage server settings for your WordPress websites.
  • WordPress Installation Options: Install WordPress alongside OpenLiteSpeed and its required components using the available installation tools.

What Can You Do with OpenLiteSpeed + WordPress?

OpenLiteSpeed + WordPress provides the tools needed to host, manage, and optimize WordPress websites. You can:

  • Install WordPress: Set up WordPress with OpenLiteSpeed using the available installation methods.
  • Host WordPress Websites: Serve WordPress websites through OpenLiteSpeed using configured virtual hosts and domains.
  • Configure WordPress Rewrite Rules: Enable and manage rewrite rules required for proper WordPress URL handling.
  • Enable LiteSpeed Cache: Configure OpenLiteSpeed's cache module and use the LiteSpeed Cache for WordPress plugin to cache website content.
  • Configure WordPress Virtual Hosts: Create virtual hosts for WordPress websites and map them to the appropriate domains.
  • Secure WordPress Websites with HTTPS: Configure SSL certificates for WordPress virtual hosts and HTTPS listeners.
  • Manage WordPress Site Settings Through OpenLiteSpeed: Control how your WordPress website is served by managing its web server settings.
  • Use .htaccess Rewrite Rules: Allow OpenLiteSpeed to load and apply supported WordPress rewrite rules from .htaccess files automatically.
  • Manage Multiple WordPress Sites: Host multiple WordPress websites on the same OpenLiteSpeed server using separate virtual hosts.
  • Check Cache Behavior: Use the LiteSpeed Cache Check Tool to verify whether a WordPress URL is being cached.

OpenLiteSpeed + WordPress on a HostGator Self-Managed VPS provides a flexible environment for hosting WordPress websites with OpenLiteSpeed's web-serving and caching capabilities. You can configure WordPress sites, virtual hosts, rewrite rules, HTTPS, and LiteSpeed Cache while maintaining full control over your VPS environment.

How to Purchase a Self-Managed VPS with OpenLiteSpeed + WordPress

Pre-configured Setup

Self-Managed VPS - Pre-configured Setup
Not sure which VPS setup is right for you? That's exactly what Pre-configured Setup is for. You'll find this option near the top of the HostGator Self-Managed VPS purchase page, and it takes the guesswork out of getting started. Just tell us what you're building—a WordPress Site, an AI Agent/Claude Code project, a Dev/Staging environment, or an eCommerce Store—and we'll automatically select the right plan, operating system, and template to match.
  • Great option if you're new to VPS or want a fast, easy setup
  • Get the recommended configuration for your project right away
  • No need to figure out the technical details yourself
  • Full flexibility to adjust settings later on
Try Pre-configured Setup and have your HostGator Self-Managed VPS ready to go in minutes!

To use OpenLiteSpeed + WordPress on HostGator, you first need to buy a Self-Managed VPS plan. Here is how to do it:

  1. Open https://www.hostgator.com/vps-hosting in your browser.
  2. Pick the plan you want and click Choose Plan.

    Self-Managed VPS - Choose Plan
     

  3. Pick a Data Center location.

    Self-Managed VPS - Data Center Locations
     

  4. On the Cart page, you can set up your server the way you want:
    1. Hardware:
      1. Pre-selected:

        You can change to a different Self-Managed VPS plan here.

        Self-Managed VPS - Pre-selected Hardware
         

      2. Configure:

        Click Configure if you want to build your own custom package.

        Self-Managed VPS - Configure
         

    2. Software:
      1. Click the Application tab.
      2. Choose OpenLiteSpeed + WordPress.

        Self-Managed VPS - OpenLiteSpeed + WordPress Software
         

      3. In the pop-up, click Confirm.

        Self-Managed VPS - OpenLiteSpeed + WordPress - Confirm
         

  5. Support & Security:

    You can add Premium Support, an optional paid add-on that gives you a dedicated specialist team for server tuning and migrations, plus priority chat and phone access. The current price is shown in your cart before you complete checkout.

    Self-Managed VPS - Premium Support
     

  6. AI Credits:

    You can add a HostGator AI Credits package, an optional paid add-on that lets you connect your application to supported LLM providers, including Claude, GPT, Gemini, and Grok, using one API key and a single bill. Supported models may change over time. The current price is shown in your cart before you complete checkout.

    Self-Managed VPS - AI Credits
     

  7. In Advanced options, you can set these up if you want:
    • Extra IPs: Add more IP addresses for an extra cost. The price depends on how many you add, and the current price is shown in your cart before you complete checkout.
    • Hostname: Give your server a custom name. This is optional.
    • SSH Key: If you want to log in without a password, add your SSH public key here. This is optional.

      Self-Managed VPS - Advanced Options
       

  8. Choose a billing term, check your Order Summary, then click Continue to Checkout.

    Self-Managed VPS - Initial Continue to Check Out
     

  9. Review your HostGator cart. Some add-ons may be included by default. Review each item, remove any you don't want, then click Continue to Checkout again.

    Self-Managed VPS - Continue to Checkout
     

  10. On the Checkout page, do the following:

    If you are new to HostGator:

    1. Fill in your billing information and contact details. If you don't want marketing emails, uncheck the box at the bottom.

      Self-Managed VPS - Billing Information
       

    2. Create a password for your account.

      Self-Managed VPS - Account Password
       

    3. Choose how you want to pay—credit card or PayPal—and enter your payment details.

      Self-Managed VPS - Payment Method Options
       

    If you already have an account, your HostGator login details will show up once you log in to your Customer Portal. If you are not logged in, click Log In.

    Self-Managed VPS - HostGator Login
     

  11. Review your payment method and order total. If you have a promo code, click Add Promo Code and enter your code. If you need to make changes, click Edit or Add Payment Method. When everything looks correct, click Submit Payment to complete your purchase. By clicking Submit Payment, you agree to the Auto Renewal Terms, Terms of Service, Cancellation Policy, and Privacy Notice.

    Self-Managed VPS - Submit Payment
     

After checkout, your Self-Managed VPS will begin setting up. Once it's ready, you can find it under the Hosting tab in your Customer Portal.

If you have questions about purchasing the Self-Managed VPS hosting, please contact us for assistance.

Getting Started with OpenLiteSpeed and WordPress

  1. Log in to your Customer Portal.
  2. From the left-hand menu, navigate to Hosting and select My Plans.

    Customer Portal - Hosting tab - View Details
     

  3. Locate the server you want to manage, then click View Details in the bottom-left corner to expand the section and access additional server information.

    Customer Portal - Hosting tab - View Details
     

  4. Click the Reset Password button.

    Customer Portal - Hosting tab - View Details - Reset Password
     

  5. In the pop-up window, type your new root password, then click Reset Password again to confirm and save the changes.

    Customer Portal - Hosting tab - View Details - Reset Password
     

  1. Connect to your VPS via SSH.
    Open your computer's terminal (or an SSH client like PuTTY) and run the following command to log into your server as the administrator, using your server's public IP address:
    ssh root@your_server_ip
    Follow the prompts and enter the new root password you created in the step above.

    Example Output:

    Welcome to Ubuntu 24.04.4 LTS (GNU/Linux 6.8.0-124-generic x86_64)
    ********************************************************************************
      WordPress + OpenLiteSpeed Stack
      Firewall: Ports 22, 80, 443, 7080 open
    
      Access URLs:
        WordPress       : https://12.3.4.456
        WordPress Admin : https://12.3.4.456/wp-admin
        OLS Admin Panel : https://12.3.4.456:7080
    
      Credentials:
        OLS Admin User  : admin
        OLS Admin Pass  : mJkS7mux3hFQQzHgmMAtest
        DB Name         : wordpress
        DB User         : wpuser
        DB Pass         : Sm4MmaJN7udGV88P6AcTTEST
    
      SSL             : Let's Encrypt (Trusted)
      Auto Renew      : Every 12 hours via cron
    
      Key Paths:
        WordPress files : /var/www/html/wordpress
        Credentials     : /root/.app_passwords
        Boot log        : /var/log/onboot.log
        Logs            : /var/log/litespeed/
    
      Quick Commands:
        systemctl {status|restart} lsws
        systemctl {status|restart} mariadb
        tail -100 /var/log/litespeed/error.log
    
      For full details: /root/README.md
      To remove this MOTD: rm -f /etc/update-motd.d/99_ols_wp
    ********************************************************************************
  2. Retrieve your unique passwords.
    Random passwords are generated automatically during the first boot. Run this command to view them:
    cat /root/.app_passwords

    Example Output:

    root@server-123456:~# cat /root/.app_passwords
    OLS_ADMIN_PASS=mJkS7mux3hFQQzHgmMAtest
    WP_DB_PASS=Sm4MmaJN7udGV88P6AcTTEST
    MYSQL_ROOT_PASS=exampleonlyNavXZ44Mz1fEVjLC
    WP_ADMIN_PASS=r9NkvbTESTmWsnVcMeQjrlK
  3. Open your preferred web browser and navigate to the initialization page:
    http://<your-server-ip>/wp-admin/install.php

    Follow the on-screen prompts to configure your actual website:

    • Enter your Site Title.
    • Create a WordPress Admin Username.
    • Create a WordPress Password (make sure to save this; it is completely separate from your server passwords).
    • Enter your Email address and finish the setup.
  4. Once the installation is complete, you can manage and view your site using these URLs:
    • To view your live website: http://<your-server-ip>
    • To log in and manage WordPress: http://<your-server-ip>/wp-admin
  5. If you need to change server-level configurations, tweak PHP settings, or manage your cache settings, you can access the server's control panel:
    1. Navigate to: http://<your-server-ip>:7080
    2. Log in with the username: admin
    3. Use the password you found in Step 7 (the value for OLS_ADMIN_PASS).

Quick Troubleshooting Commands

If your website isn't loading, paste these commands into your SSH terminal to check if the background services are running properly:

  • Check the Web Server:
    systemctl status lsws
  • Check the Database:
    systemctl status mariadb
  • View Error Logs:
    tail -100 /var/log/litespeed/error.log

Additional Information and Examples

You can run cat /root/README.md to see more information and useful commands:

Example Output:

root@server-123456:~# cat /root/README.md
# OpenLiteSpeed & WordPress

## Description

OpenLiteSpeed & WordPress is a performance-optimized combination that helps you run fast, reliable WordPress websites with built-in caching and server efficiency. OpenLiteSpeed's native WordPress caching plugin works alongside WordPress to reduce page load times, handle higher traffic, and lower server resource consumption compared to standard web server configurations.

## Image contents

This template installs and configures:

- OpenLiteSpeed web server
- LSPHP (LiteSpeed PHP)
- WordPress (latest) via WP-CLI
- MariaDB local database service
- UFW firewall rules for SSH, HTTP, HTTPS, and OLS Admin
- WordPress at `/var/www/html/wordpress`
- OpenLiteSpeed config at `/usr/local/lsws/`
- Logrotate configuration at `/etc/logrotate.d/openlitespeed-wordpress`
- App password store at `/root/.app_passwords`

## Services

| Service       | Ports | Purpose                        |
| ------------- | ----- | ------------------------------ |
| OpenLiteSpeed | 80    | Web server serving WordPress   |
| OLS WebAdmin  | 7080  | OpenLiteSpeed admin panel      |
| MariaDB       | 3306  | Database backend for WordPress |
| OpenSSH       | 22    | Remote access                  |

Ports are protected using UFW.



## OpenLiteSpeed configuration

The default OpenLiteSpeed configuration is at `/usr/local/lsws/conf/httpd_config.conf`.

Key settings include:

- Virtual host config: `/usr/local/lsws/conf/vhosts/wordpress/conf/vhconf.conf`
- Document root: `/var/www/html/wordpress`
- PHP handler: LSPHP via LiteSpeed SAPI
- Admin panel port: `7080`
- Admin username: `admin`
- Admin password: `OLS_ADMIN_PASS` -- replaced at first boot by the per-instance cloud-init script

The systemd service unit is `lsws` and starts OpenLiteSpeed as the `lsadm` user.

## WordPress configuration

WordPress is installed at `/var/www/html/wordpress`.

Key settings in `/var/www/html/wordpress/wp-config.php`:

- `DB_NAME = wordpress`
- `DB_USER = wpuser`
- `DB_PASSWORD` -- replaced at first boot by the per-instance cloud-init script
- `DB_HOST = localhost`

## First-time access (How to use)

SSH into your server using your cloud provider credentials and the server public IP:

ssh root@<your-server-ip>

Get the generated passwords:

cat /root/.app_passwords

After the VM boots, complete the WordPress setup at:

http://<your-server-ip>/wp-admin/install.php

Fill in:

- Site title
- Admin username
- Password (save this!)
- Email

Access the OpenLiteSpeed admin panel at:

http://<your-server-ip>:7080

Login credentials:

- Username: `admin`
- Password: value from `grep OLS_ADMIN_PASS /root/.app_passwords`

## Useful commands

Check OpenLiteSpeed service:

systemctl status lsws

Check MariaDB service:

systemctl status mariadb

View OpenLiteSpeed error log:

tail -100 /var/log/litespeed/error.log

View systemd logs:

journalctl -u lsws -n 100 --no-pager

Show generated passwords:

cat /root/.app_passwords

Verify listening ports:

ss -tulnp

## Validation tests

The template includes validation checks that verify:

- `lsws` and `mariadb` are enabled and active
- `/usr/local/lsws/conf/httpd_config.conf` exists
- `/var/www/html/wordpress/wp-config.php` exists
- first-boot script exists and is executable
- OpenLiteSpeed is listening on port 80
- `curl -I http://127.0.0.1/wp-admin/install.php` returns HTTP 200
- LSPHP processes are running (`ps aux | grep lsphp`)
- logrotate config passes dry run (`logrotate -d /etc/logrotate.d/openlitespeed-wordpress`)

## Notes

- `OLS_ADMIN_PASS` is the OpenLiteSpeed WebAdmin password. It is different from the WordPress administrator password you create in the setup wizard.
- MariaDB listens on localhost only and is not exposed externally.
- Logs are centralized under `/var/log/litespeed/`, `/var/log/wordpress/`, and `/var/log/mysql/`.

## Manage

- WordPress: http://{server_ip}
- OLS Admin Panel: http://{server_ip}:7080

## Links

- OpenLiteSpeed documentation: https://openlitespeed.org/docs/
- WordPress documentation: https://wordpress.org/documentation/
- WP-CLI documentation: https://wp-cli.org/

Loading...