Need help with installation with ubuntu wordpress

I am fairly new to all of this thing. I recently play around with LAMP stack on free f1micro sever on Google Cloud, got site running sort of but speed is not there. I heard that openLitespeed is faster and less resource intensive, so I am willing to learn and redo. So I want fresh start.

So this is what I have right now: 1) a wordpress directory with all files already setup with htaccess 2) a back up of that database with a username and password sync to the wordpress directory 3) I will start a new f1micro and install swap file.

So from all my reading
1) setup basic ubuntu server 18, get swap file 1g and run basic sudo apt update && sudo apt full-upgrade
2) run this cmdn I guess: wget --no-check-certificate
3) copy MY wordpress directory to /usr/local/lsws/mysitename
4) run --wordpresspath /usr/local/lsws/mysitename

Now this is where I am lost. since I am NOT running the -w I don't get the whole thing of LSPHP, MySQL, WordPress, LiteSpeed Cache for WordPress ????

so after I run #4 above, how do I get the sql database and blah whatever else
Also should I run a more combind command of --wordpresspath /usr/local/lsws/mysitename -r -a --dbname "name of my existing database" --dbuser "name of my existing database user from wordpress" --dbpassword "password of my database"

Then run
mysql -u [username from above] -p [my database name] < [my backup sql database].sql

now hopefully my wordpress should work and I install LiteSpeed Cache for WordPress

I am guessing I am missing something. Please someone who is wiser than me please help me out. I done as much home work as I can but not sure. I am pretty sure I am missing a bunch of stuff and security related too.


Active Member
Usually one click will do all thing just in one command with the right parameters.
Include the mysql installation and settings.
If you can run it correctly, you are good.
Hi @GammaBurst ,

have you ever consider to use the openlitespeed wordpress image from GCP marketplace. It's free and easy to use.
check docs here,
And you can migrate the site after server launch.

do you guys know if command I presented above make sense or would you know how do it better? (I tried to google video for openlitespeed, but there are pretty much none (just some dude with notepad and not very informative or good) as for the wordpress image on GCP, 1 I try to remain free or super low cost with GCP (ideally remain in the forever free tier, I think using the image in the market kick me out of that maybe I am not too sure, but it sure doesn't have the line "744 hours of the server usage are free in 1 month", 2 I sort of want to do thing myself. I noticed that image also contain some mem cache and some other things which is great for normal sever but micro server only 600 ram barely enough to run stuff let alone cache using ram. Trying to install the absolute minimum and crucial stuff, using as little resource as possible.


Hi @GammaBurst ,

I guess you are using free trial account, openlitespeed wordpress image is free and no countdown timer for sure.
Sure, that's talk about 1click installation script.
First, please make sure you run the script with root permission. Second, please add execute permission to your Third. You should not moving your wordpress and then install a wordpress on the same location. Please try to install wordpress with 1-click script first, make sure wordpress/db/php all works fine, then starting migrate your wordpress site.

Ok guys, so I did it, for all the others who will come behind me. This is what I did to get it to work

1) open google cloud create one of those f1 micro instance (there are so may video on this I like the chrititus one (but it was on install lamp stack, but it gave me a good overview and starting place, but I have to modify a lot of it)
2) Install using ubuntu LTS 18 minimal image (other images are too bloated and we have so little memory)
3) SSH in sudo apt update then sudo apt upgrade
4) This version of ubuntu doesn't come with nano or wget. So sudo apt install nano sudo apt install wget
5) Make a 1g swap file using below (I took this from online youtubber christitus, his video was for LAMP stack)

$ sudo fallocate -l 1G /swapfile
$ sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576
$ sudo chmod 600 /swapfile
$ sudo mkswap /swapfile
$ sudo swapon /swapfile
$ sudo nano /etc/fstab add the following line to swapfile swap swap defaults 0 0

6) restart your server make sure swab file is still active, it should
7) wget --no-check-certificate
8) chmod +x ./
9) sudo ./ -r -a -w (so I get to assign the password I want and install wordpress, my way in the original post to migrate everything directly install the incorrect php version so everything went to hell, also the tag --dbname --dbuser and such didn't create the database for me when I try)
10) let the run and finish

11) so now everything should work, however you have to go back to your google cloud and firewall session to open up 2 additional port (look up on how to do this, open 7080 (this is for the web admin interface) and 8088 (for the example page, with the PHP info test page), I did this for my home IP address only, so no one else can get in)

12) play around as you wish, if you don't have an existing wordpress site, you should be done, you can get to you ipaddress and start setting it up. http://IP address of your server to config the site https://IP address of your server to config the site:7080 for the admin panel of the server http://IP address of your server to config the site:8088 for the Example page.

13) As I have my own wordpress back up, Now I upload my back up directory of my wordpress file (I have a tar file) and my backup of my database.sql I upload this to the google cloud server my home folder

14) Create the sql database with the same name as your back up with the same password from your wordpress config file (I took this from online youtubber christitus, his video was for LAMP stack, but gave me a good basic)

$ mysql -u root
> CREATE DATABASE yourdatabasename;
> GRANT ALL ON yourdatabasename.* TO 'yourdatabaseusernamefromwordpressconfigfile' IDENTIFIED BY 'yourpasswordfromwordpressconfigfile';
> quit
$ mysql_secure_installation

15) run mysql -u [username from above] -p [my database name] < [my backup sql database].sql this will import my backup database to this new database, which have the same user name and password and name. So I don't have to mess with my wordpress config file.

16) go to /usr/local/lsws/wordpress/ there are tons of file in here, this is here because we install the oneclick script with the -w. I wipe out this entire directory content, and put my wordpress tar file here an untar it. This step required a bit of linux know how to move files and delete file.... There are too many little steps and variation here. But just get your wordpress directory here.

17) permission time. sudo chown -R nobody:nogroup /usr/local/lsws/wordpress/ this will change all the permission to the wordpress directory to the correct one

18) Now I think we should be done, your wordpress is now active. You have to access the OpenLiteSpeed admin page to activate the rewrite and .htaccess reading and restart the server.

19) IF anyone know how to fine tune the openlitespeed server for the f1micro instance please please let me know

20) you have to install the LS cache, the server stuff is already set.

21) use cloudflare CDN, because this server is bitty. I followed this guide

so guys. I thank you for all the help from the community. This is my contribution. I need additional help with settings of the server, please help