Dear advanced programmers,
Till now I have been using a Linux (3 core, NVME, Ubuntu 20.04) Ubuntu VPS Server to host just 5 WordPress websites, using Apache2, MySQL, PHP, certbot (doing option 2 HTTP->Https redirect). While performing Google Page Speed Insight I have found out that "Server response times (TTFB)" was horrible at least 2 seconds, while the total page load time is 2.6 seconds. This is horrible, since it is clear the Server is causing this I have executed 'sudo htop
' and I have opened the same website 14 times at once (so acting like 14 unique users).
And all my 3 cores were full! 100% they cannot handle just 14 requests? So I need to change something in my architecture this can't go on like this, otherwise I need to have 4 cores VPS for just 1 website, which is too expensive. So basically I am looking for THE MOST EFFICIENT WAY to host WordPress Websites on a Linux VPS. As in the Server needs to be quick as possible in handling DATABASE requests and WWW file sharing requests.
Any smart guy who can tell me how to do it better? What I found now: NGINX > Apache. So exactly the same environment as before but just NGINX (I think it will actually not change so much, just a small improvement which I am not looking for). Maybe using Docker? Please help me!
Shortly: The goal of me is to have a multi-WordPress hosting so efficiently as possible on a Linux VPS.
The New Server of me (all praises to God) will have the following specs:
- 6 CPU vCore
- 16 GB RAM
- 300 GB SSD
- Ubuntu 18.04 (the hosting has only 18.04, and not 20.14 :( )
The reason why I have chosen to use Linux-Ubuntu is because of its speed (efficiency) but if there are any better OS please let me know, this is my first time Linux, but Windows was too slow and expensive so I am 3 months into Linux-Ubuntu.
Here a screenshot of the sudo htop
when I requested 14 times at once just one website of me, all cores are outrun immediately, while without before doing that it was just 2%. (btw Hosting is in The Netherlands, and I am requesting the website from The Netherlands):
The ScreenShot
P.s. I am thinking about using Docker, since I get every week a new customer to make a WordPress website, and I want to set it up and delete/freeze his WordPress website most efficiently as possible. Is Docker faster than LAMP/LEMP in Ubuntu, or does using Docker to execute LAMP/LEMP do make it slower? Thanks in advanceee!?? #LookingForTheMostOptimalAndEfficientWordPressHostingServer
I followed this tutorial and it helped me a lot: https://spinupwp.com/install-wordpress-ubuntu/
Unless someone else shows me a faster way, then I will see this question as answered, thanks all.