How to install WordPress on VPS on Hostinger

intermediate 35 min read Updated 2026-03-13
Quick Answer

Use Hostinger's one-click WordPress template in hPanel to rebuild your VPS OS, run the interactive OpenLiteSpeed setup script via browser terminal, point your domain DNS to the VPS IP, then complete the WordPress installer in your browser. The process takes 30-45 minutes including DNS propagation. SSL is automatically enabled via Let's Encrypt.

Prerequisites

  • Hostinger VPS plan (KVM recommended)
  • Domain name ready to point to VPS IP
  • hPanel login credentials
  • VPS root username and password from SSH access tab
  • Basic familiarity with DNS records

Step-by-Step Instructions

1

Log in to hPanel and access your VPS

Open your browser and navigate to hPanel, Hostinger's control panel. Log in with your credentials, then select VPS from the sidebar. Click Manage next to your VPS plan to open the VPS management page.
Ensure you have a KVM VPS plan for the WordPress template compatibility.
2

Change OS to WordPress template

In the VPS management page, go to the sidebar and select OS & PanelOperating System. Under Applications, choose the WordPress template. Click Change OS to rebuild. Wait 5-10 minutes for completion, monitoring the status in hPanel.
3

Open Browser Terminal for SSH

Return to the VPS overview in hPanel. Click Browser terminal (allow pop-ups if prompted). Enter your VPS root username and password from the SSH access tab. No external SSH client is required.
Browser terminal is more convenient for beginners than PuTTY or Terminal.
4

Run interactive OpenLiteSpeed setup script

Upon login, the interactive script auto-launches. Enter your domain name or VPS IP address when prompted. Respond to prompts with y (yes) for defaults like SSL setup and automatic updates, or n (no) as needed. Press Enter through all questions until completion message (e.g., "OpenLiteSpeed installed successfully").
Always enable SSL with <code>y</code> for secure HTTPS.
5

Point domain to VPS IP via DNS

In your domain registrar's DNS panel (or Hostinger DNS), add an A record: Name set to @ (root domain), Value as your VPS IP from hPanel VPS Overview, TTL default 14400 (4 hours). Wait 5-30 minutes for propagation; verify with tools like WhatsMyDNS.
Find VPS IP in hPanel under VPS Overview for accuracy.
6

Access and complete WordPress installer

Visit http://your-domain.com or http://your-vps-ip. Select installation language (default English). Enter Site title (e.g., "My Blog"), Username (avoid "admin", use "wpuser"), strong Password (12+ chars), and Email. Click Install WordPress; success redirects to wp-admin login.
Use a unique username and strong password to enhance security.
7

Verify and secure with SSL

The script enables Let's Encrypt SSL; visit https://your-domain.com. If HTTPS not forced, in terminal run:
/usr/local/lsws/admin/misc/admpass.sh
(set admin password, default user admin). Access OpenLiteSpeed admin at https://your-vps-ip:7080 to enforce HTTPS redirects.
Regularly check OpenLiteSpeed admin for server optimizations.
8

Access WordPress dashboard

Go to your-domain.com/wp-admin and log in with your admin credentials. Customize themes via Appearance, add plugins, and start building your site.

Common Issues & Troubleshooting

"Error Establishing a Database Connection"

Verify MySQL credentials in <code>wp-config.php</code> via file manager: check database name, username, password, host. Reset password in hPanel <strong>Databases → Management</strong> → three dots → <strong>Change Password</strong>. If persists, delete and recreate the database.

File permission issues after setup

Set directories to 755 and files to 644 via file manager or terminal (<code>chmod 755 directories; chmod 644 files</code>). Focus on <code>/wp-content</code> and root WordPress files.

DNS not propagating or site unreachable

Confirm A record points to correct VPS IP. Wait full TTL (up to 4 hours), clear browser cache, or test with WhatsMyDNS. Temporarily use VPS IP directly.

SSL not active or mixed content warnings

Run <pre><code>/usr/local/lsws/admin/misc/admpass.sh</code></pre> in terminal, access <code>https://your-vps-ip:7080</code>, enable HTTPS redirects in OpenLiteSpeed admin.

Script fails or OpenLiteSpeed not starting

Ensure VPS used fresh WordPress template (no prior installs). Rebuild OS if needed. Check hPanel status and terminal logs for errors.

Special Offer

Affiliate link. We may earn a commission at no extra cost to you.