Skip to content

Build WordPress Image

E.L edited this page May 23, 2019 · 18 revisions

Build WordPress

Follow this guide to build an OpenLiteSpeed WordPress image/template/snapshot.

Build Process

1. Launch a Server

Choose the Long Term Support version for the base image, e.g. Ubuntu 18.04.

Select a basic plan from the cloud platform.

2. Install OLS + WordPress

You can use a single command to install WordPress easily. It is totally free and does not require any kind of license.

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

This installation may take around 7~10 minutes to finish.

3. Install Launch script

bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/claunch.sh ) 

This step may clean up all SSH access methods, which means once you exit the server, you will not be able to SSH back

Launch script will do following:

a. Set up Welcome Banner

This is just a basic SSH console welcome message template. The banner will do the following:

  • Check the public IP address

  • Display how to get Wordpress login access

  • Display how to get SQL access

b. Install Upgrade Script

This script provides the system auto update function and domain setup assistant.

c. Others

  • Regenerate SSL Certificate

  • Regenerate phpMyAdmin key

  • Regenerate SQL password

  • Clean up passwords

  • Clean up SSH keys

  • Clean up logs

4. Build Image

Start building your image by SnapShot, Image or Template, which are provided by cloud providers, and that's it. You can now launch any type of servers from the snapshot you just built.

Test (Optional)

Validate script from DigitalOcean which can do some basic check if any log left in the system.

bash <(curl -sk https://raw.githubusercontent.com/digitalocean/marketplace-partners/master/marketplace_validation/img_check.sh )

There are many functions on the WordPress image. You can try some basic tests to make sure the important functions are working fine. For example:

  • Build an image via the cloud platform's build function

  • Launch a new server with same image you just built

  • Check if both the .db_password and .litespeed_password files generated on root or the /home/ubuntu folder correctly

  • Visit the IP on the Browser, and you should see a LiteSpeed Landing Page

  • SSH into server, you should now be able to install the wordpress from browser

  • Confirm page has a cache hit on it

Maintenance

  1. Launch the server from the snapshot/template/image
  2. Run the maintain script
bash <( curl -sk  https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Maintain/maintain.sh )
  1. Install Launch script
  2. Test (Optional)
You can’t perform that action at this time.