WordPress Cloud Image FAQ

February 6th, 2023 by LSCache , OpenLiteSpeed 2 Comments

WordPress Cloud Image FAQ

LiteSpeed cloud images allow you to spin up a high performance web server and applications in three minutes or less! These images are available from several providers, including DigitalOcean, Vultr, Google Cloud Platform, AWS, Azure and Alibaba Cloud, and they come with a variety of web applications, the most popular of which is WordPress.

So let’s say that you’ve chosen a provider, and installed an OpenLiteSpeed and WordPress cloud image. You’re up and running, but maybe you have questions. Well, you are in the right place, because we have answers! Here are some of the common things that people like you want to know:

Where are the WordPress files stored?

After your cloud image installation is complete, the WordPress files can be found in the Document Root, which is set to /var/www/html.

Can I complete the script later?

Sure. If you don’t want to finish the setup script right now, you can press CTRL-C to exit the script. The next time you log in from the SSH console, the script will automatically pick up where you left off. You can CTRL-C as often as you need to. The script will prompt you at every future login until you complete the setup.

How do I secure phpMyAdmin?

There are three ways to secure phpMyAdmin: Change the URL, allow only specific IP addresses, and require a password. You can use any of these options, and you can use more than one of them, if you like.

Change your phpMyAdmin URL

In the WebAdmin Console:

  • Navigate to WebAdmin > Virtual Hosts > Context
  • Change URI from /phpmyadmin to the URI of your choice

Only allow specific IP addresses

In the WebAdmin Console:

  • Navigate to WebAdmin > Virtual Hosts > Context > phpmyadmin
  • Change Access Allowed from * to a comma-delimited list of allowed IP addresses and subnets
  • Set Access Denied to *

Require a password

Log into the SSH console and create a password file, like so:

$ sudo touch /usr/local/lsws/conf/PASS
$ sudo chown lsadm:lsadm /usr/local/lsws/conf/PASS

In the WebAdmin Console:

  • Navigate to WebAdmin > Virtual Hosts > Security
  • Click + under Realm List then set Realm Name to example
  • Set User DB Location to /usr/local/lsws/conf/PASS
  • Click /usr/local/lsws/conf/PASS to create a user and password
  • Navigate to WebAdmin > Virtual Hosts > Context > phpmyadmin
  • Set Realm to example

How do I create additional virtual hosts?

OpenLiteSpeed comes with a single virtual host named example. There are two ways to create additional virtual hosts: with a script, and manually.

With a script

This method will automatically set up Listener, VirtualHost, Force SSL, Let’s Encrypt, and WordPress. You can run the script either in Interactive Mode, or from the CLI.

Interactive Mode

Use the following commands to download and run the script:

wget https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh
chmod +x vhsetup.sh
bash vhsetup.sh

Or just run the script without downloading it:

/bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh )

CLI Mode

Use the following commands to download and run the script:

wget https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh
chmod +x vhsetup.sh
bash vhsetup.sh -d www.example.com -le admin@example.com -f -w

Or just run the script without downloading it:

/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 -w

Some tips:

  • In the example, we use -le admin@example.com. When you do this, be sure that your domain is already pointing to the server, and to substitute your own email address.
  • We also use -w. This requires that your environment has PHP, SQL service, and SQL root password.

Manually

Our OpenLiteSpeed knowledge base has full instructions for creating new virtual hosts manually. See Create Virtual Hosts on OpenLiteSpeed.

Can I use LiteSpeed Enterprise with the Cloud Image?

Sure. You can upgrade from OpenLiteSpeed to LiteSpeed Enterprise at any time. We have a script that will take care of this for you, though we do suggest that you try the script on a test server first. Also, you can get help by using the -H parameter when you run the script.

Use this command:

/bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/ols2ent-v2.sh )

The script will:

  1. Generate a LiteSpeed Enterprise configuration file from your OpenLiteSpeed config file
  2. Ask you for a valid license key (enter the word Trial if you would like to start with a 15-day trial license)
  3. Back up the OpenLiteSpeed config file and uninstall OpenLiteSpeed
  4. Install LiteSpeed Enterprise and load the config file

Conclusion

We hope we’ve answered all of your burning questions, but if there’s anything else you want to know, take a look at our comprehensive documentation. Or drop by our Slack community (first timers, click here for an invitation) and ask your question in the #openlitespeed or #wpcache channel!

Thanks to Eric Leu for his contributions to this post.


Categories:LSCache , OpenLiteSpeed

Related Posts


Comments