olNGIb4NkK5r2x7x4oG3GpEzizVpnY6KNCck9cym

Installing Wordpress with SSL on VPS with Aapanel

Install Wordpress with SSL on VPS with Aapanel

In this tutorial will show you how to setup wordpress site on VPS (Virtual Private Server), Using free panel from Aapanel.

Prerequisites

  • CentOS 7.1+ (Ubuntu16.04+., Debian9.0+)
  • Ram min 512M, recommended 768M
  • Disk min 1GB

In this tutorial I use VPS from hetzner CX11 (1 VCPU, 2GB RAM, 20GB SSD, 20TB Traffic) for €2.49/month

Install Aapanel

  1. Open ssh connection to VPS and update (switch user to root if user is not root using command “sudo su”)
    yum -y update
  2. Install Aapanel using the following command
    yum install -y wget && wget -O install.sh http://www.aapanel.com/script/install_6.0_en.sh && bash install.sh

    Type y when asking “Do you want to install aaPanel to the /www directory now?(y/n): ” and wait until you get this screen in your terminal

    Install Aapanel
  3. Open aaPanel Internal Address in the browser and login using username and password showing in the terminal
    aaPanel Internal Address is like this : http://YOUR-VPS-IP:8888/RANDOMCODE/

  4. Install LNMP by ticking check box on Nginx, MySQL, PHP, phpMyAdmin and uncheck Pure-Ftpd because we don’t needed at this time, choose method Fast and click One-click button to start the installation. I use the following version: Nginx 1.19, MySQL 5.7, PHP 7.3, phpMyAdmin 5.0

    Install LNMP aapanel
  5. Installation will take some time, you can go grab some coffe and snack while waiting the installation finish

    Installing LNMP aapanel

    After successfully installed, go to App Store by clicking App Store menu on the left pane, and click Installed menu button
    Click switch button to green in Display on Dashboard to show all the installed software on Dashboard

    Installed Software on Aapanel

Setup Wordpress Site

  1. Go to Site Manager by clicking Website menu on the left pane and click Add Site button to create new site for wordpress

    On the Add site window type YOURDOMAIN.COM for wordpress in domain input box, for example mine was wordpress.blogdoang.com, you can also check Add [www.yourdomain.com] domain name to the main domain name to add www or leave it uncheck.
    Leave other setting default and make sure to leave Apply for SSL and HTTP redirect to HTTPS is unchecked, we will generate SSL and redirect later

    Creating Site on Aapanel
  2. After site is created, Point your domain A record to VPS IP Address
    I use cloudflare, so in cloudflare dashboard go to DNS and add A record like the following setting, make sure Proxy Status is DNS only or Grey color because we will generate SSL for the domain other wise SSL generate will fail

    A record domain cloudflare
  3. Now setting URL Rewrite for wordpress, in Site Manager Aapanel click Conf and click URL rewrite menu and then choose wordpress then click save button

    Wordpress URL rewrite nginx
  4. Click SSL and on Let’s Encrypt tab choose File verification for Verification Mode and tick Select All check box and then click Apply button to generate SSL certificate
    After SSL certificate successfully generated, click switch button on Force HTTPS

    Force HTTPS aapanel
  5. Now lets create database for wordpress installation, click Databases on left pane menu and in Database Manager page click Add database button for creating new database
    Fill in DBname, Username, Password and make sure to save the details because we need it for wordpress installation later, leave other setting default.

    Creating database on Aapanel

Installing Wordpress

  1. On Site Manager page and click Root directory to go to website root directory
    root directory link
  2. In root directory, select all files and delete
    Delete all files
  3. Download latest wordpress installation by clicking Remote download button and paste this link https://wordpress.org/latest.zip to URL address and click Confirm button
    Download file from aapanel
  4. Extract latest.zip file by clicking Unzip and confirm, after that delete file latest.zip
    Move all content inside wordpress folder to site root directory by clicking wordpress folder and select all files and directory and then click Cut

    Cut content in aapanel
  5. Click back button to back to root directory
    Back button aapanel
    And then click Paste button
    Paste content aapanel
    So the final directory will look like this
    Wordpress installation directory
    Don’t forget to delete wordpress folder.
  6. Go to https://YOURDOMAIN.com, click Continue and click Let’s go and then fill in Database name, username, password with database detail you created earlier.
    Wordpress install page
    Click submit then click Run the installation button, and install wordpress like usual.
    Wordpress detail page
  7. Done, wordpress site with SSL on
    wordpress site with ssl

Useful links

Aapanel : https://www.aapanel.com
Aapanel Documentation : https://doc.aapanel.com/web/#/3?page_id=117
Wordpress : http://wordpress.org
Hetzner : https://www.hetzner.com

Related Posts

Post a Comment