One-Click WordPress Website On Vultr Cloud Hosting

0
286

WordPress -Most popular blogging system

WordPress was started in 2003 and is now used by over 20% of the top 10 million websites. Launching a WordPress application on Vultr will take you to the WordPress setup page, which lets you fit the application to your needs.

This article contains information about the WordPress application that can be deployed on Vultr.

1.How to Install WordPress on Vultr

Follow the steps below on how to Install and setup WordPress on a Vultr VPS.

Step 1
The first thing you will need to do is signup for a Vultr VPS. I recommend the VPS with 20GB SSD, 1 CPU, 1024MB Memory, and 2,000GB Bandwidth (this is what I am using in my tutorial). But depending on your project the smaller VPS would be fine as well.

Step 2
Once you have an account setup it will walk you through deploying a new instance. Choose “Compute Instance.” I am choosing the Dallas location as I am located in the United States and I like have my servers centrally located. But you can choose whichever location you think is best for your visitors.

Step 3
Next you need to choose a Server Type. ServerPilot runs on 64-bit Ubuntu 16.04 so that is what we will choose, as we will be connecting ServerPilot later on. Note: Ubuntu 15.10 is not a long term supported release, so that is why we won’t be using that.

Step 4
Next enable IPv6. You can also enable “Auto Backups.” However I won’t be in this example as the site I am deploying is not that crucial. An instance with automatic backups enabled will have a 20% higher monthly/hourly fee.Default option is ok.

Step 5
Next you can add startup scripts and SSH keys. I won’t be bothering with any of that. All left for me to do is give my server a label. Note: This server label will appear over in ServerPilot later on, however ServerPilot does let you change the display name on their side.

Step 6
Then click on “Deploy Now” to get your Vultr VPS up and running.

It will then begin installing. Mine took about 2 minutes to fully deploy.

Once it is up and going you should get an email from Vultr,just check it ,and enjoy your life.

2.How to Manage WordPress on Vultr

App Details

WordPress runs on the Ubuntu 16.04 operating system. You can log into this system with an SSH client using the root login found on your Vultr control panel. Installations prior to April 2018 were built on the CentOS 6 operating system.

Initially, you will need to access https://[SERVER_IP]/wp-admin/ in your web-browser. Substitute the [SERVER_IP] with the IP address of your VPS. The certificate warning can be safely ignored. Login credentials are sent to you in an email, and can also be found in your Vultr control panel. Once you have completed the WordPress setup, you can access your WordPress site at http://[SERVER_IP]/ or https://[SERVER_IP]/.

You may also want to point the DNS “A record” of your website to your [SERVER_IP]. This will allow you to access WordPress by navigating to your website (www.example.com). If you update your DNS record, be sure to edit your “WordPress Address (URL)” and “Site Address (URL)” to match your domain name. These settings are located in WordPress Admin (https://[SERVER_IP]/wp-admin/-> Settings -> General. Also, you will need to update the server_name attribute in the Nginx site configuration files, otherwise WordPress will be unable to send email. Follow these steps:

vim /etc/nginx/conf.d/wordpress_http.conf
# Change the server_name underscore "_" to your domain name.

vim /etc/nginx/conf.d/wordpress_https.conf
# Change the server_name underscore "_" to your domain name.

systemctl restart nginx.service

Removing wp-admin Login Prompt

For security purposes, your WordPress app has an initial login prompt that opens when accessing the /wp-admin/ page. To remove this prompt, follow these steps.

  1. Login to your server using ssh as root.
  2. Create a backup of your vhost files: cp /etc/nginx/conf.d/*.conf /root/
  3. Edit both vhost files in /etc/nginx/conf.d/. You need to remove the block of code that starts with location ^~ /wp-admin/. It is about 15 lines long.
  4. Save your changes, and restart the web server: systemctl restart nginx.service; systemctl restart php7.0-fpm.service

SSL Details

Your WordPress server can be accessed with both http:// and https:// URLs. By default, the https:// URL uses a self-signed certificate, which displays a security warning. This can be safely ignored.

To disable https:// support, do the following:

  1. Login to your server using ssh as root.
  2. Move the HTTPS vhost file out of the web server conf: mv /etc/nginx/conf.d/wordpress_https.conf /root/
  3. Restart the web server: systemctl restart nginx.service; systemctl restart php7.0-fpm.service

Depending on your plans for your WordPress site, you may want to update the certificate to one provided by an actual certificate authority. This will remove the security warning error. To install a new certificate, do the following:

  1. Obtain a certificate from a certificate authority for your domain.
  2. Login to your server using ssh as root.
  3. Replace the server.crt and server.key files in /etc/nginx/ssl/ with the updated certificate. Details on converting certificate formats are outside of the scope of this article.
  4. Restart the web server: systemctl restart nginx.service; systemctl restart php7.0-fpm.service

SQL database

There is a MySQL database server running on the VPS. You can connect to the database by executing the following:

mysql -u root

The MySQL root password is saved on the VPS in /root/.my.cnf.

Files/Folders of Interest

  • MySQL logs: /var/log/mysqld*.log
  • Vhost conf: /etc/nginx/conf.d/
  • Vhost SSL: /etc/nginx/ssl
  • WP code: /var/www/html/
  • WP uploads: /var/www/html/wp-content/uploads
  • wp-cli: /usr/local/bin/wp

About Vultr Applications

Vultr applications use modern releases of software packages. Applications are configured to be deployed with specific versions of software. Over time, the Vultr team will update the application offerings to include newer operating systems, package versions, etc. This document only provides up-to-date information about the latest version of this application. Vultr applications are updated without notice. If you plan to build a project or infrastructure based on our application templates, we recommend taking a snapshot of the application used in your initial deployment.

LEAVE A REPLY

Please enter your comment!
Please enter your name here