Guide to setup high performance/cheap Wordpress hosting with HTTPS

Cleast Intwood

Power Member
Joined
Jul 2, 2016
Messages
689
Reaction score
421
Ive been building some sites and tried different hosting solutions. Cpanel is nice to have obviously, but its not a necessity. These shared hosting deals are more expensive then Digitalocean/Vultr and with worse performance.

1. Signup for a digitalocean or vultr account, or both as i do.

2. Create a VM. Pick ubuntu 16.04 and install it in the region that you want to target. The smallest VM will most likely be enough, unless you have A LOT of traffic or a very big/complex site.

3. Create a serverpilot account, add your VM ip and root password and select PHP version. Id recommend 7.2 unless your specific theme is incompatible with the latest php version. Install wordpress.

4. Setup DNS. Edit nameservers for your domain at your domain registrar to digitalocean/vultr. Then add CNAME and A records on digitalocean/vultr. Theres plenty of guides on how to do this on google.

5. Install HTTPS(Domain needs to be redirected to your VM before this step works)

SSH might sound advanced but its super simple, promise. Install putty(windows) or similar ssh client and connect to your VMs ip/domain. enter root as login and the root password as password. You can just copy the root password and then right click into putty to paste it. This is we use putty here and not the console, because u cant paste into web console.

Now that you are connected thru SSH, open this guide: https://github.com/rehmatworks/serverpilot-letsencrypt

TLDR you should first enter this into console:
git clone https://github.com/rehmatworks/serverpilot-letsencrypt.git && cd serverpilot-letsencrypt && sudo mv sple.sh /usr/local/bin/rwssl && sudo chmod +x /usr/local/bin/rwssl && (crontab -l ; echo "@monthly \"sudo service nginx-sp stop && yes | letsencrypt --standalone renew &>/dev/null && service nginx-sp start && service nginx-sp reload\"")| crontab - && service cron reload

And when that is finished, enter this:
rwssl
You will have to follow the installation but its super straightforward and simple. After that you have free letsencrypt SSL installed that will renew every 3 months.

Then install simple HTTPS or similar WP plugin into ur site and your all done!

Yauyy!!


Addon: If you already have Digitalocean/serverpilot setup but without HTTPS, u can just install the https as the guide instructs, then install "better search replace" plugin, search for http://yourdomain.com (or with www if you have that as main), replace with https://yourdomain.com and then install "simple https" plugin, done!
Is there any better way to do this? Better alternatives? If so please comment!
 
Last edited:
Ive been building some sites and tried different hosting solutions. Cpanel is nice to have obviously, but its not a necessity. These shared hosting deals are more expensive then Digitalocean/Vultr and with worse performance.

1. Signup for a digitalocean or vultr account, or both as i do.

2. Create a VM. Pick ubuntu 16.04 and install it in the region that you want to target. The smallest VM will most likely be enough, unless you have A LOT of traffic or a very big/complex site.

3. Create a serverpilot account, add your VM ip and root password and select PHP version. Id recommend 7.2 unless your specific theme is incompatible with the latest php version. Install wordpress.

4. Setup DNS. Edit nameservers for your domain at your domain registrar to digitalocean/vultr. Then add CNAME and A records on digitalocean/vultr. Theres plenty of guides on how to do this on google.

5. Install HTTPS(Domain needs to be redirected to your VM before this step works)

SSH might sound advanced but its super simple, promise. Install putty(windows) or similar ssh client and connect to your VMs ip/domain. enter root as login and the root password as password. You can just copy the root password and then right click into putty to paste it. This is we use putty here and not the console, because u cant paste into web console.

Now that you are connected thru SSH, open this guide: https://github.com/rehmatworks/serverpilot-letsencrypt

TLDR you should first enter this into console:
git clone https://github.com/rehmatworks/serverpilot-letsencrypt.git && cd serverpilot-letsencrypt && sudo mv sple.sh /usr/local/bin/rwssl && sudo chmod +x /usr/local/bin/rwssl && (crontab -l ; echo "@monthly \"sudo service nginx-sp stop && yes | letsencrypt --standalone renew &>/dev/null && service nginx-sp start && service nginx-sp reload\"")| crontab - && service cron reload

And when that is finished, enter this:
rwssl
You will have to follow the installation but its super straightforward and simple. After that you have free letsencrypt SSL installed that will renew every 3 months.

Then install simple HTTPS or similar WP plugin into ur site and your all done!

Yauyy!!


Addon: If you already have Digitalocean/serverpilot setup but without HTTPS, u can just install the https as the guide instructs, then install "better search replace" plugin, search for http://yourdomain.com (or with www if you have that as main), replace with https://yourdomain.com and then install "simple https" plugin, done!
Is there any better way to do this? Better alternatives? If so please comment!
except for no. 5 i just read something exactly similar on another blog. so thanks for that. i too am planning to do this and am pretty excited. how was your experience so far? and which one would u recommend - do or vultr?
 
except for no. 5 i just read something exactly similar on another blog. so thanks for that. i too am planning to do this and am pretty excited. how was your experience so far? and which one would u recommend - do or vultr?
Ait, the script i posted for renewal was broken recently but should work fine again now.

Its working super great, just be sure to check the 3 month mark so the auto renewal is actually working. From there ur golden!

Hmm, i use both vultr and do and i must say i have noticed no difference whatsoever. Vultr lets you copypaste root password for droplet which is nice, other than that, dunno.
 
Solid information there. Especially the SSH advice. Nice post. :)
 
Ait, the script i posted for renewal was broken recently but should work fine again now.

Its working super great, just be sure to check the 3 month mark so the auto renewal is actually working. From there ur golden!

Hmm, i use both vultr and do and i must say i have noticed no difference whatsoever. Vultr lets you copypaste root password for droplet which is nice, other than that, dunno.
thanks. i think ill go with vultr as its cheaper and i hear many say its faster. i can host multiple wp sites on one hosting plan right? thanks
 
Ait, the script i posted for renewal was broken recently but should work fine again now.

Its working super great, just be sure to check the 3 month mark so the auto renewal is actually working. From there ur golden!

Hmm, i use both vultr and do and i must say i have noticed no difference whatsoever. Vultr lets you copypaste root password for droplet which is nice, other than that, dunno.
it seems i can install wp from vultr itself with one click. if so whats the benefit of using serverpilot? only ssl? is the folder structure different when u use serverpilot?
 
Thanks for the share.

When I look at this or any other similar tutorial, it will be 20% of "Yeah, I've got this" and 80% "Fuck it, I'll try my luck" because I have no idea what each line of code actually does, how it does it and how it affects anything in the grand scale of things.

I'm a total newbie, using serverpilot to manage all (so if something went wrong, I'd be toast).

Because there seems to be an external file from a 3rd party website involved, is there a risk of potentially implementing malicious code on my server by downloading and installing such codes? (Not saying yours is, but who knows...)


That is the main reason why I've been super hesitant with actually going through with one of those tutorials. At some point, I'll just go "fuck it", but there's still some time and hope some1 puts up a decent tutorial for newbies like me (or that I figure things out before that).


Another alternative I found that seems somewhat decent up to the point where I have to do something in .htaccess (every1 just says to add something there, but absolutely NOBODY is saying how to actually add the code there, how do I get there, etc - there's a subtle difference, but it's probably the most important from my perspective atm).

https:// wpbeaches . com / add-lets-encrypt-ssl-certs-serverpilot-free-plan /

There they mention the script you referred to in this post, but prefer some other guy's script instead.
 
Last edited:
SSH might sound advanced but its super simple, promise.
So I learned as much as I could and felt like 50% fuck it. I went through with the guide now myself (for the first time ever, as a total newbie).

I shit my pants when I tried your TLDR instructions (it didn't work).

I found out why shortly after googling the problem - the author had updated his guide.

But going through the guide wasn't all that smooth. I shit my pants again, but managed to solve the problems that came up. Had to go off the script by filling the gaps in the form of missing tools and whatnot giving errors and not letting me follow the guide.

Having powered through them problems, from there, things were, indeed, surprisingly simple, almost like magic. Since I have almost no clue how it actually works, I wonder if there will be complications in the future because of this solution...
 
So I learned as much as I could and felt like 50% fuck it. I went through with the guide now myself (for the first time ever, as a total newbie).

I shit my pants when I tried your TLDR instructions (it didn't work).

I found out why shortly after googling the problem - the author had updated his guide.

But going through the guide wasn't all that smooth. I shit my pants again, but managed to solve the problems that came up. Had to go off the script by filling the gaps in the form of missing tools and whatnot giving errors and not letting me follow the guide.

Having powered through them problems, from there, things were, indeed, surprisingly simple, almost like magic. Since I have almost no clue how it actually works, I wonder if there will be complications in the future because of this solution...
Im glad it worked out for u!

Yesterday i noticed my SSL is not updating as it should, and found out theyres a change in the script. Its in Python now.

Im a noob at Linux and the update wasnt all that smooth, but i finally managed to get it updated. Ill update one of my sites now and write the details on how i do it here.

  • Start SSH(putty etc) and connect to domain
  • Login with root / password ( PW is in vultr client, for DO u have to check ur email inbox)
  • Remove old script with this line "rm /usr/local/bin/rwssl"
  • sudo apt install python-pip (this one didnt work on two of my sites, had to do "sudo reboot" and then connect again for it to work. Expected it to go like this now to show u guys how to handle it but didnt happen.)
  • pip install rwssl
Got this error now: "line 9, in <module> from pip import main ImportError: cannot import name main"
Did "sudo reboot" then reconnect.
  • pip install rwssl
Got new error msg about setuptools.
  • apt-get install -y python-setuptools

  • pip install rwssl
certbot libs not found, auto updates then run command again, tadaaaaaaaa

Ok so i got a different error this time, but able to work through it.
If u get a random error, try sudo reboot first and run command again. Has fixed issue 50% of times for me so far.

If u run into another issue and fix it, please post what u did as it can help others! Maybe i should be posting this on github instead but fuck it. Its here now!
 
serverpilot is one of my fav free panel, but now its not free anymore. do u have recomendation other free panel and easy to use for wp blog?
 
serverpilot is one of my fav free panel, but now its not free anymore. do u have recomendation other free panel and easy to use for wp blog?
Yes, you can give VPSrobots at https://vpsrobots.com/ a try. I feel that there's so much in common between VPSrobots and Serverpilot, for example, especially the support for manage unlimited VPS.
The major difference is that VPSrobots is based on desktop on your PC rather than on your server, like most of client softwares on your desktop, it is farily easy to install and uninstall. Most of all, unlike a web-based app, a client panel will not consume the precious resources in the server.
Hope this helps.
 
Back
Top