Build a WordPress Site on a VPS: From Zero to Live
WordPress powers over 40% of the web, and running it on your own VPS is faster and more flexible than shared hosting. This article gives you two installation routes and the key optimizations after launch.
Prerequisites
You need: a VPS with at least 2 cores / 4 GB (Ubuntu 22.04 recommended) and a domain already pointed at the server IP. See the DNS configuration article in this help center for how to point it.
Route 1: control panel (recommended for beginners)
Install aaPanel, then deploy WordPress from the "Website" menu in one click: the panel creates the site and database and downloads WordPress automatically. You only fill in your domain, then issue a free SSL certificate from the SSL tab. The whole process takes under 10 minutes.
Route 2: command line (LEMP)
Manually install Nginx, MySQL and PHP-FPM, create a database and user, download and extract WordPress into the web root, configure an Nginx server block to pass PHP requests to PHP-FPM, then issue SSL with certbot. This suits users who want full control of the stack.
Four key optimizations after launch
- Caching: install a cache plugin (LiteSpeed Cache or WP Super Cache) — turning dynamic pages into static ones gives an immediate speed boost;
- Images: enable WebP and lazy loading; compress product and article images before uploading;
- Security: change the default login URL, limit login attempts, keep core and plugins updated;
- Backups: schedule daily database and weekly full-site backups via plugin or panel cron, and store them off the server.
Common issues
"Slow loading" usually means no cache plugin or oversized images. "Upload failed" needs a larger PHP upload_max_filesize. "502 in the admin panel" typically means PHP-FPM ran out of memory. Each of these is covered in depth in the troubleshooting section of this help center.
Cet article a été rédigé avec l'aide de l'IA par l'équipe éditoriale de SharkCloud et relu avant publication.