Author: Ahmed Faruq

Coding is easy, the main challenge is finding a way to break down complicated stuff into easy junks, that is what Ahmed's thriving for, finding every possible means to simplify complex tasks.

2 Ways To Migrate Your ClassicPress Site To New Host With No DownTime

Migrating your website to a new hosting provider can be quite challenging especially if you are doing it for the first time, but it doesn’t have to be.

Even if you get past the migration, the few little issues you might encounter during migration could cause downtime & data loss, which you should avoid at all cost.

In this guide, you will learn two good ways of migrating a ClassicPress website with neither zero downtime or data loss, but before we get started, I’ll love to stress this point:

Pick a Reliable Hosting Provider

You don’t want the hassle of jumping from one hosting provider to another. This is why it is crucial to pick a suitable and reliable hosting platform. Invest your time and effort in comparing different hosting offers.

Is your current shared hosting server not up to par? Switch to a managed ClassicPress hosting solution. A simple google search of “ClassicPress Managed Hosting” should show you various options.

If your business is growing very quickly, you might also consider using either a VPS or a dedicated server, this way you can always ensure optimal server performance.

Note: Don’t inform your current hosting providers about the migration until about 5 days after you move, because they could terminate your account and cause something worse than downtime. Test the new server for a while and if it fits your need, delete the other server and rock on.

Let’s get started with the migration.

Method 1: Using a Plugin (UpdraftPlus)

Once you have selected your new hosting platform, the next step is to download and activate UpdraftPlus on your ‘old website’.

UpdraftPlus is a free plugin that provides a complete website backup solution plus an option to backup remotely, it backups your files (images, videos), database, plugins, and themes.

Before we start backup up a complete website, it is advisable to put the website you’ll be migrating in read-only mode (disable comments and forms, make sure you halt your editors from publishing contents, installing plugins, etc)

Step 1: Backing Up a Complete Website

Let’s take a backup. Go to UpdraftPlus backup settings:

You can either download your backup file or save it to remote storage. To make the process easier, I’ll go with the remote option.

Note: It’s best to avoid backing up to the web server, because losing the web server would mean losing both your website and all of your backups. Instead, you can download the backup to your local hard disk. This option isn’t necessary if you are backing up remotely, but it doesn’t hurt to keep two copies.

Navigate to UpdraftPlus Settings, and choose remote storage.

I am using Google Drive, but feel free to use whatever soothes you as long as you have an account with the remote provider.

UpdraftPlus needs authorization access to your Google Drive account. Follow the link to authorize access to your Google Drive account and Allow Access.

Once you’ve allowed access, click the Complete Setup button to proceed:

Push the backup button:

and you should see a couple of options, make sure “Send this backup to remote storage is ticked” among the other two outlined in the image below. Click backup once you are done cross-checking:

Depending on the size of your ClassicPress website, this could take a couple of minutes.

If you receive “UpdraftPlus Vault: this site has not been connected” don’t fret; re-click the Backup button and hopefully, UpdraftPlus should reconnect to your remote storage.

You should see this once the backup is completed:

You can also download the backup to your local hard-disk, but this is totally optional.

It’s time to restore the backup on your new host, but before we do, we need a way to test the new host/server without it been publicly available, this is done via the Hosts file. (This make sure your old server is still running while you are testing the new one.)

Step 2: Modifying the Hosts File

A hosts file is a simple text file that associates or maps an IP address with hostnames, this is kind of difficult to grasp but this is basically how it works:

When you buy a new server/hosting, you are given an IP address for that server. The IP address is like a phone number that is associated with your domain name. For example, classicpress.net has its own IP address. When you type in classicpress.net in the URL address bar, it resolves (or connects) the domain name “classicpress.net” to the IP address where your website “lives”. For example, the IP address for classicpress.net is 192.33.44.55. Similarly, your mum’s name in your phone book has a specific phone number attached to it, and if you call it, you’ll connect with your mum… you get the idea 😉

At first, I want to be the only one to access the new server so I can test if everything works correctly before I go live. To do this, I create a hostname (my current URL address) and associate it with the new IP address I got from our new hosting provider.

Don’t overthink it; this is like creating a local server with your domain name but in this case, you are faking the URL of your domain name to point to the new server’s IP address.

First, copy the new servers’ IP address. If you don’t know how to find your new host IP, ask your hosting provider. (This is also a test to show if their customer support is responsive or not.)

Once you’ve copied the IP address, edit the hosts file on your computer. Instructions for both Windows and Linux/OSX below:

On Windows, the file is located at C:\Windows\System32\drivers\etc

Right-click on the hosts file and open with your preferred text editor:

Add both your new host’s IP address and your existing domain name to the file. Now, whenever you visit the domain name, it will point to your new server, but only on your computer. This makes testing easier.

Note: Hosts file doesn’t determine the protocol you would use, so, you don’t have to add http:// or https://

Save.

On Linux & OSX machine:

Fire up your terminal and run sudo nano /etc/hosts

If that command isn’t working on mac, use sudo nano /private/etc/hosts

Add both your new host’s IP address and your existing domain name to the file:

linux:

OSX:

Save with CTRL X and confirm with y

Clear DNS cache: sudo service nscd restart

Now, if you visit your domain name, it would be loading the content from your new server. But we haven’t imported the backups yet. Let’s dig into that next.

Step 3: Restoring Backup to the new hosting server

Now that you are able to access new host, download and install ClassicPress either via Softaculous, Installatron or manually, here is tutorials on how to do it:

Once you install ClassicPress, the next step is to download and activate UpdraftPlus on your ‘new website’.

You will need to reconnect UpdraftPlus to the remote storage you connected to earlier (in my case, it was Google Drive), this way, you will be able to restore the backups in one click:

UpdraftPlus needs authorization access to your Google Drive account. Follow the link to authorize access to your Google Drive account and Allow Access.

Once you’ve allowed access, click the Complete Setup button to proceed:

Rescan the remote storage from the existing backup section to get the stored backup file:

And that should show you the backup file:

Go ahead and restore the backup data:

Once you’ve done that, you will see a restore window, select all that applies and click next as shown in the image below:

UpdraftPlus would retrieve and prepare the backup files:

If the website address in the backup data is different from that of the new site, you may get a warning about it. While that isn’t an issue, do make sure the URLs are both of the same formats. For example, if you had https://example.com in the old URL, the new URL should also be https://example.com and not https://www.example.com or http://example.com. This isn’t an issue if the variations are redirecting to the proper URL.

Finally, click Restore:

Hopefully, the migration should be completed! Feel free to test if all the files are intact. If all your files are in place and you are done with testing, we can move on to adding DNS records of the new host.

Step 4: Updating Your DNS Server

To avoid confusion, delete the line you added to the hosts file. If you don’t, your computer will use the address mapping in the Hosts file and it won’t query the DNS.

Note: The changes can take anywhere between 30 minutes – 48 hours, use dnschecker to monitor the website propagation across the globe. – Thanks to James for pointing this out

Now that you have both files on both hosting accounts, it is time to update your DNS nameservers with the ones provided by your new hosting provider. Please contact them if you are finding it difficult to find them.

It usually looks something like this:

ns1.yourhostingprovidersname.com

ns2.yourhostingprovidersname.com

Once you have the DNS, go to your domain registrar account to make the changes.

If you are using Namecheap as your registrar, this is under the Domain Tab (If you aren’t, ask your host where it is located.):

Then scroll till you get to ‘Nameservers’ and choose Custom DNS

Add the DNS records:

Step 5: Wait For Propagation

Once you have updated your DNS servers, you will need to wait between 30 minutes to 48 hours from the time of the change before your site will load from the new host. Although we can reduce the TTL for faster propagation, this is beyond the scope of this guide. If you want to learn more, there are some good tutorials on best practices for TTLs on the web; your hosting company should be able to help you here as well.

While your DNS servers are propagating worldwide, your site will load either from the old hosting account or the new hosting server if the DNS flushes in some region. This ensures a smooth transition. After a day or two, you can cancel the old host account.

Method 2: Migrating Manually

If you want to manually migrate to a new server, you will have to back up the file & database and then transfer it to the new host. This is pretty straight-forward. To do this, you can either utilize your hosting control panel (e.g Cpanel, VestaCp, etc) or use an FTP clients such as Cyberduck, FileZilla or WinSCP.

I’ll be using WinSCP as my FTP client!

Step 1: Download ClassicPress Files & Database

First, you connect to the old hosting server with WinSCP:

You can ask your hosting provider for the FTP details. Once you have connected, Open the public\_html folder (or your host’s equivalent). Select all the files inside it and Right-Click to Download:

Once the download is completed, it is time to backup the database:

Access your PHPMyAdmin page from your hosting control panel. Once you are in, select the Database you want to export, and click the Export Button:

Click the ‘Quick Method’ and Go.

Once you click Go, your database should be downloaded.

Step 2: Upload ClassicPress Files and MySQL Database to Your New Host

The next phase is to upload all you’ve downloaded from your old host to the new host server:

  1. First, extract the backup you downloaded.
  2. Connect to the new server with your Ftp client
  3. Navigate into the public\_html directory
  4. Upload the files you just extracted into the public\_html directory
  5. Lastly, let’s create a new database for the new host

Access your PHPMyAdmin page from your hosting control panel. Once you are in, click on New:

Input your new database name and click create:

Navigate to Privileges Tab and Add user account:

Type in a username, localhost and a password in the fields as shown in the image below:

Grant user privilege.

Note: If you don’t want to be a superuser or an Admin, you can uncheck the Administration privilege.

Click on the Go button to save the details:

Take note of the database name, username, and the password.

Select the new DB you just created:

Click the Import tab:

Upload the SQL backup you downloaded the other time and click Go:

Once you have chosen the SQL file, click Go at the bottom of the page, and that should upload the records.

Step 3: Update wp-config.php with Your New Database Details

Access your new host account with an FTP client and make the public\_html your working directory.

Once you are in, the next step is to edit the wp-config file (Right-Click to edit):

Replace:

  • DB_NAME — The name of the new database you created
  • DB_USER — The username of the new database you created
  • DB_PASSWORD — The password of the new database you created
  • DB_HOST — database hostname should be localhost

Save when you are done, replacing the above values with your information.

Note: For a full overview and explanation of the wp-config file you can look at this tutorial.

Step 4 & 5

Same as Method 1

That’s all 😉

How To Setup ClassicPress on Ubuntu 16.04 Using VestaCP at Digital Ocean

In this guide, you will learn how to set up, install and configure ClassicPress on an unmanaged web server at Digital Ocean VPS.

The server we are going to set up should be running on Ubuntu 16.04 with a working Vesta Control Panel that can be used to manage multiple websites, email accounts, Ftp accounts, Mysql Databases, DNS records and more.

Requirements:

  • Your time.
  • A cup of water.

Let’s go steadily and consistently.

To start with, let’s discuss…

An Unmanaged Server

As the name explains, an unmanaged server is one that is not automatically controlled or managed by a hosting provider or other service; it is managed by you. The hosting provider gives you access to a dedicated server where you install the necessary components to keep your server & website running. There is no support mechanism to could guide you if anything goes wrong.

So, you can either hire skilled people to help you with the configuration or you can do it yourself with a manual installation guide. (Be aware that you can mess things up if you aren’t skilled enough.)

For a moment, let’s assume you have a knowledge of how to set up a server and you got your website running successfully. Fortunately for you, in time your business/website starts to gain traction and your business starts to grow. But, over time, you notice your website has become a resource hog. Your dedicated unmanaged server isn’t capable of serving your website anymore.

All is not lost! You have three options:

  1. Add more resources to the existing server. This may or may not be possible, depending on your hosting provider. Some hosting providers allow for an upgrade, while others do not. If you are lucky and your provider supports an upgrade, then you can add more resources. However, there are usually limits to how much you can add and, depending on how it is set up, you may experience some downtime during the transition. 
  2. Add more servers and distribute them accordingly. This can be a daunting task, as you have to manually configure them yourself or hire knowledgable people to do it for you.
  3. Migrate to a cloud server. A cloud server is capable of scaling automatically as the need arises.  You can automatically upgrade CPU, Ram, or Disk Space with little to no downtime. 

This guide will assist you in registering and configuring your cloud server at DigitalOcean.

What is a DigitalOcean VPS?

DigitalOcean is a cloud hosting provider that offers, among others, Virtual Private Servers (called Droplets). Like a dedicated server, you own your Droplet. You have the privilege of choosing your OS during deployment and you’ll also be able to configure the VPS to your liking.

The benefits of using Digital Ocean’s VPS solution are that they maintain the hardware for you, and you can automatically scale when the need arises.

If you feel like learning more about DigitalOcean, I created an article on that: What is Digital Ocean and What Are Droplets Used For [Simple Guide!]

With that understanding, we are ready to move into the main meat of this guide. (Who doesn’t love meat anyway? 😉 )

Note: I’ll assume you have a registered domain name

Let’s buy a server at DigitalOcean and get on to setting up ClassicPress.

Registering at DigitalOcean

If you have a registered domain, then you want to point the domain name to your Droplet. (You’ll remember I said a Droplet is Digital Ocean’s name for a Virtual Private Server). You need to purchase a Droplet to proceed.

Hey: Get $100 free credit for 60-days when you use ClassicPress referral link, this way, you not only enjoy free credit but you also help in supporting ClassicPress infrastructure. 

This is a no-referral link, if you prefer: Register with DigitalOcean

Step by Step Instruction:

  1. Click on the ClassicPress referral link above, and fill in your details as shown below:
    Register DigitalOcean alt
    I obfuscated some fields for personal reasons 😉

     

  2. Sometimes, you might be redirected to a Recaptcha page upon clicking the “Create Your Account” button. Verify you are not a robot and you will be redirected to the below image. Click “Create Account”

     

    Register DigitalOcean 2
    You will only see the green box saying you’ve received free $100 when you use ClassicPress referral code
  3. You will be sent a confirmation link to confirm your email address. 

  4. Once you’ve verified your email address, you will need to set up your billing account. This is necessary in order to eliminate frauds and spammers. Fill in your credit card details or use PayPal to make the process faster.
    DigitalOcean credit card details
    You may see a temporary authorization hold on your card, which your bank should release soon. DigitalOcean does not charge you until you start using paid services.

     

  5. Don’t be surprised if your account is automatically locked after verifying your payment details. Don’t be scared; you will be unlocked after the team checks it manually, This could take a few hours, so if you don’t want to wait, contact them using this email address: [email protected]
    Tips: In case you are asked the reason for choosing DigitalOcean, reply by saying:  I want a better cloud hosting with a greater uptime for my website. 

Hopefully, your account is now unlocked, and you are ready for the next step. We’ve covered a lot already, this is where the information you learn above should merge together like ice-blocks 😉

Creating a Droplet on DigitalOcean/Creating an SSH

Droplet is the nickname of Digital Ocean’s VPS (Virtual Private Server). They are virtual machines that run on top of a virtualized hardware. They mimic a real server in that you are provided with a set amount of CPU, SSD (Solid State Disk) Storage, and RAM.

Let’s create our first Droplet:

  1. Click on your new project and fill the fields: Name of your project, description, and purpose.

    Add new project alt

     

  2. Click on “Get Started With a Droplet”Get started with a droplet
  3. Select Ubuntu 16.04.6 x64

  4. Wait! Don’t select the $40 Droplet, you don’t need it if you are just starting out. The $5 Droplet can handle more than you think it can. Select the $40 Droplet if you know what you are doing. If you use the ClassicPress referral link, the $40 Droplet covers you for two months, which is $80, then you pay $40 every following month.

    For me, the $5 Droplet is okay for now.
    Don't select 40 bucks alt
    .
    $5 droplet
    $10 Droplet isn’t bad either if you feel 5 bucks is too cheap 😉

     

  5. Select your datacenter region (where you want your data hosted, e.g if your users are based in New York, select it, if you don’t have an idea, kindly ignore and select at random).
    Data centre and more alt
    Please tick those boxes the red arrow is pointing to

     

  6. Please Select SSH as your authentication. Secure Shell is more secure than using a password to login on your server. SSH helps to communicate remotely with another computer in a secure way by ensuring that the exchange of data is encrypted. Encrypting the data keeps it from being intercepted by an unauthorized system. There is more to this, but for now, just see SSH as being stronger when compared to Password authentication.

    Let’s proceed.
    Select SSH alt
    Select SSH and Click on NEW SSH KEY
    Add a public ssh key alt
    Enter Your SSH Name Here

     

In completing these steps, some stuff could get complicated along the way. Let me briefly explain the concept of how SSH works:

Do you remember when I said “SSH helps to communicate remotely with another computer”? 

There are two pairs of SSH keys: Private and Public. The private is known as the client key (those are the ones in your physical or local computer); the public key is stored in your server (in this case, your Droplet).

When the client tries to connect to the server, the client does this to the server:

  • Client: “Hey server, I am your boss, I have the private keys.”
  • Server: “Hmm, where is your signature if you are my boss?”
  • Client: “……….” (note: the client isn’t actually sending the private keys. It demonstrates to the server that he is the owner of the private key, in the form of a digital signature)
  • Server: “Let me verify from my Public key.”

The server verifies the signature and if it correlates, the client is given access to the server.


We need a way to generate the Private and Public Keys. On windows we use a program called PuTTY, on Mac and Linux, you use Openssh.

I am on Windows, so, I will be using PuTTy. Mac and Linux users can follow the on-screen instructions here:

 SSH Keys for Linux and Mac
Scroll using the scrollbar to follow the above image for openssh!

 

Steps for windows are as follows:

Go to the PuTTy website, and download the setup appropriate to your system:

PuTTy setup
Download the 32-bit version if you are on a 32-bit system, I am on a 64-bit system, so I should be downloading the 64-bit version

 

Install PuTTy on your local computer by double-clicking the putty program file,

 Putty installation wizard 1

Upon clicking on Next in the above image, click on the subsequent Next and wait for PuTTY to complete the installation.

Once that is done, search for PuTTYgen or locate it inside this folder: C:\Program Files\PuTTYand open puttygen.exe

To go to this folder on a 32-bit system: C:\Program Files (x86)\PuTTY

Open PuTTY gen

Click Generate and then move your mouse randomly over the blank area. (This is called the entropy of mouse motion. Bring in thousands of users, and no one would ever predict your mouse movement. This means no one can reproduce your keys. If you are curious to learn more, you can read this StackExchange answer .)

Your key looks like this, once it is generated:
The generated ssh key alt

You can also password protect your SSH key by filling the Key passphrase field. This way, if someone gains access to your computer, they will need to provide a passphrase to access it. Keep in mind that you must provide this passphrase every time you use this key.

Note: Don’t use a simple password or password you’ve used elsewhere; use something stronger. You can generate one here: Password generator

Once generated, store the password inside a private book at home. (No, don’t keep it on your PC.)

Save your Private Keys in a folder in your local computer:

Save private key

We are getting there!

Copy Public Key
.

Copy the Public Key and paste it in your DigitalOcean account. Make sure you copy everything:

Paste Public Key in DO

Click “Add SSH Key”

The last step of finalizing our Droplet: Choose your name, add tags and Click “Create Droplet”

Finalize DigitalOcean
You can also enable backup

You will see a progress bar:

Progress bar DO droplet

You see this once the progress bar is done setting the server up:

26. Done with DO setup

The next part is initial server configuration and a basic server security enhancement that helps in securing your server a bit. When we are done with that, we will point our domain name to our DigitalOcean IP and finally install VestaCP.

Connect to your Droplet with PuTTY on Windows

Since we have PuTTy installed, let’s configure it to connect to our DigitalOcean Droplet

    1. Open PuTTy: Locate it inside this folder: C:\Program Files\PuTTY and open putty.exe, if you are on a 32-bit system, goto this folder C:\Program Files (x86)\PuTTY and open putty.exe
      27. Open PuTTy
      .
      28. Putty opened
      Putty window ↑

       

    2. Copy The Droplets IP: Copy your Droplet IP address in the control panel, and paste it in the putty IP field:
      29. Copy Droplet IP
      Copy Droplet IP in DigitalOcean control panel ↑
      30. Paste Droplet Ip to Putty
      Paste it in the field Hostname ↑

       

    3. Add SSH Key: Add the private ssh key we generated in putty
      31. Add the ssh authentication
      Add ssh authentication ↑
      32. Select the ssh private key
      Select the private key we generated from putty the other time ↑

       

    4. Add Root User: root is the default administration user on an ubuntu server. Let’s add it to the Auto-login username field:
      33. Add The Root Username
      Type in root ↑

       

    5. Lastly: Save your session for recurrent login
      34. Save New Session
      Type in the session name, in my case, I wrote “My New Session” ↑

       

Once you are done with the above steps, you can open up PuTTY and select your new session to access your server.

Note: The first time you connect to the Droplet, PuTTY’s security alert pop-up asks you to confirm that you trust the server. Please choose “Yes” to save the server host key as this is the first time you are connecting, or select “No” to connect without saving the identity.

35. Load the new session
Load the new session you saved ↑
36. Confirm the server security
Select Yes ↑

 

PuTTY automatically adds your root username. Since we are using an SSH key, you will be prompted for the password you set on your key. Input the password and you should be automatically connected to your Droplet server:

Putty prompting for passkey of user root ↑
You can see we are connected to the Droplet server ↑

Initial Server Setup In Ubuntu (Recommended)

I almost skipped this part!
This section is highly recommended if you care about tightening your server security, usability and reliability.

I won’t cover this in this guide, as I already wrote a detailed tutorial on how to do this: Initial Server Setup on Ubuntu 16.04 [Enhancing Server Security]

If you prefer an automatic method, you can use a setup script from Jason Hee; it does the heavy lifting for you.

In my opinion, you should go with the manual method. You will not only learn how to troubleshoot issues in the future but also see what is going on step by step. Ultimately it is up to you.

Pointing DigitalOcean Nameservers to Your Domain Name

I am using Namecheap, so, the control panel could be different from yours, but it should be similar regardless of the panel.

Go into domain manager:

39. Domain Manager Namecheap

Add Digitalocean nameservers:

40. Custom DNS Namecheap
This should be ns1.digitalocean.com, ns2.digitalocean.com, and ns3.digitalocean.com

Now, head back to the Digitalocean control panel and create 2 new domain names. One should be your real domain name (e.g websitename.com) and the other should be your panel name (e.g panel1.websitename.com):

41. Add a domain
Click on Add a domain

42. add the domain name in the field and click create domain

 

Repeat the above step and create a new domain for your control panel URL: panel1.websitename.com where websitename should be the name of your domain. 

If you’ve done that, you should now have this:

43. Listed Domain Name

Navigate into the websitename.com, and add a CNAME record pointing www.websitename.com to websitename.com:

44. cname www. to domain.com

If everything is done properly, you should have the below DNS records:

45. Last DNS records

Remember: “websitename.com” should be your domain name, I’ve used this only as an illustration.

Installing Vesta Control Panel

First, log in to your non-root user account. If you don’t have a non-root user, follow this guide Initial Server Setup on Ubuntu 16.04 [Enhancing Server Security]

Download bash install script using the following command:

sudo curl -O http://vestacp.com/pub/vst-install.sh

You might be prompted for a password to confirm you are the new user. Enter the password for the non-root user and proceed by removing group admin using:

sudo groupdel admin

Finally, use this to install vesta:

sudo bash vst-install.sh

You will be asked to confirm the software you want to install on your system, enter y and hit enter:

46. Vestacp first prompt

You will be asked to enter your email address, please enter one:

47. Vestacp 2nd prompt_email

Lastly, you will be asked to enter your FQDN (Fully Qualified Domain Name), this should be the panel URL: mine is panel1.devsrealm.com

Note: Devsrealm is the name of my domain, so you should replace it with yours:

48. Vestacp 3rd prompt_fqdnl

Vestacp takes about 15 minutes to complete the setup, so sit back, take a sip of your water, and watch.

Once that is done, Vesta gives us the info to access our control panel:

49. Info to login the vestacp

Copy the panel and paste in your preferred browser, this is mine: https://panel1.devsrealm.com:8083

Note: If you aren’t able to access your panel URL, it probably has to do with the DNS propagation. It might take anywhere between 30 minutes – 48 hours. If this happens to you, you can use your Droplet IP to login instead; e.g 157.245.94.17:8083. You can also check the url using whatsmydns.net to see if your url has propagated yet.

You will get an SSL warning like this, kindly click on advance and proceed. The warning is normal for first-time access:
50. SSL warning when connecting to new vestaSetting Up Your Vestacp

Log in with the user and password Vesta generated for you:

51. Login to vesta using the given admin and pass

Don’t be like the average Joe! The first thing you should do is change your Vestacp password.

Hover over the admin area, and click Edit:

52. Hover the vestacp admin area and click edit

You can either let Vesta generate the password for you, or you can generate it yourself using Password generator

Wait! Don’t save the settings yet. You can also change other settings like the user’s first and last name, but the most important part to change is the Nameserver:

Change both fields to ns1.digitalocean.com & ns2.digitalocean.com:

53. Change the Nameserver to DO's own

Press Save when you are done fiddling with the settings. Take your time!

When you are done saving, Navigate to the Web Section:

54. Navigate to web section in vestacp

You should see this:

55. Vestacp web section

Before we continue editing, visit the URL to confirm all is in place properly. You should see an Apache Ubuntu Default Page, telling you it works!

56. Apache Ubuntu Default Page

 

You can read those later, head back to the web section in Vestacp and click on add web domain name.

Adding New Domain

57. Web section ADD DOMAINt

Add your domain name and change the IP address to the IP address of your Droplet like so:

59. Adding domain name_1

Click Advanced Options, and use the following setting:

  • Aliases should be www.yourdomainname.com, this way your user can access your website using www
  • Web Template – Default
  • Proxy Support – check
  • SSL Support – check
  • Let’s Encrypt Support – check
  • Web statistics – choose Awstats, I love how it shows me the bandwidth I am consuming
  • Statistics authorization – check, and add a unique user & pass
  • Additional FTP – If you feel you need one for uploading to your hosting easily, check and create the user and password; leave the path as is
  • Save.

 

60. Vestacp Advance section in web

 

Access your website URL (e.g yourdomain.com) and you should see something similar:

61. empty domain vestacp

 

Adding A New Email Account

Go to the mail section and hover over the domain you’ll want to add the email support for:

62. Add mail account for domain name

Add your username in the Account field; add a unique password and click on the advanced section

62. Mail account vestacp simple field

The Quota allows you to set a mailbox size limit. This is useful since you’ll want to reserve disk space for other things. You can press the infinity icon to give it an unlimited storage

Aliases allow you to add other email addresses that forward to that main account. You don’t need this in most cases. The only case you might need is when you have an email account on another service, and you want to keep your emails on that service.

Send login credential to an available email of yours and click Add

63. Advance section vesta mail

To access your email, use panel.example.com/webmail, where example.com should be your domain name. Log in with the user and password you just setup, and you should be ready to go!

Note: You can also use branded nameservers if you have one. It is possible to brand your nameserver if, for instance, you want to use a custom nameserver for every website you are using e.g (ns1.yourwebsite.com). This is beyond the scope of this guide, but if you want to host multiple websites on one Droplet, just point your new domains to the default DigitalOcean nameservers at your domain registrar (ns1.digitalocean.com, ns2.digitalocean.com, and ns3.digitalocean.com) and add new domain as we’ve done above. When adding new domains, make sure you select public address from the listed IP addresses.

Installing ClassicPress Via Softaculous

Softaculous comes pre-installed in Vestacp. It is useful for using scripts to install platforms like ClassicPress, Presta, Joomla, Abantecart, and WordPress.

Unfortunately, ClassicPress isn’t available in the free version of Softaculous, but there are workarounds. We can either use a free “Softaculous one-month trial license” to install ClassicPress or use wp-cli to download and install ClassicPress. Installing via wp-cli is a little more complex than we want to get into for this example, so for now, let’s use the free month trial.

Note: You can also buy a VPS license for $12 a year. The price is very reasonable!

Visit Softaculous Free Premium for your free trial. Enter your Droplet IP and click issue license

64. Softaculous free trial

Give it about 5 minutes to process, and log in to your panel.

Click on App at the upper section:

65. Accessing softacoulous in vestacp

 

Search for ClassicPress:

66. Search for classicPress in softacoulous

You should see the ClassicPress page. Hover over the Install tab and choose Custom Install:

67. Use custom install for cp

Use this setting to complete the installation:

  • Software Setup – Choose your domain name, and make sure the In Directory is blank
  • Site Settings – Add the website name and your preferred description
  • Admin Account – You need this to access your admin panel, input user, password and email of the account
  • Enter your email in the Email installation details, and Install

 

68. ClassicPress Custom install setting

When you are done installing, you will be given info details, which should look something like this:

69. ClassicPress installation detail in softaculous

Access the admin dashboard(e.g https://yourwebsite.com/wp-admin) and go rock with ClassicPress.

I hope you enjoy the guide! This is a journal on how I did the setup, so if you are confused or some sections aren’t clear, please don’t hesitate to ask on the Forums. You can also message me privately on the ClassicPress Slack workspace @Horlaes. I would be happy to help you out if I can.

Credit: Thanks to Wade Striebel & William Patton for pointing out errors and demystifying complex terminologies.

Props to the hard-working people at ClassicPress, Wade, James, Tim Hughes & Tim Kaye, Klein, Lan, John, Alan, Earle, Elisabetta, Fabian, Michelle and others I didn’t mention.

This article has been provided by Ahmed Faruq and was originally published on DevsRealm.com. The original post can be found here.