{"id":2182,"date":"2020-02-17T22:42:03","date_gmt":"2020-02-17T20:42:03","guid":{"rendered":"https:\/\/upcloud.com\/global\/us\/resources\/tutorials\/configure-classicpress-using-vestacp\/"},"modified":"2020-02-17T22:42:03","modified_gmt":"2020-02-17T20:42:03","slug":"configure-classicpress-using-vestacp","status":"publish","type":"tutorial","link":"https:\/\/upcloud.com\/global\/resources\/tutorials\/configure-classicpress-using-vestacp\/","title":{"rendered":"How to configure ClassicPress using VestaCP"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">ClassicPress is a fork of WordPress (without Gutenberg) that serves as a business and a professional focused CMS. What sets ClassicPress apart is the preservation of the classic TinyMCE editor as the default option. Moreover, it is strictly a community-based project and decisions are been made democratically (Suggestion and Features can be made via the petition system).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Following this tutorial you can learn how to set up, install and configure a ClassicPress website on Ubuntu 18.04. To make this easy and fast, we are first installing Vesta Control Panel that can be used to manage multiple websites, email accounts, MySQL Databases, DNS records and more. VestaCP also provides a built-in Analytics, Server Statistics, Backups &amp; Restore, Free SSL from Lets Encrypt, Great CLI &amp; API, and many more.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/signup.upcloud.com\/\">Test hosting on UpCloud!<\/a><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First, you will need to deploy a new cloud server that fulfils the minimum system requirements of 512MB RAM, 20GB of storage, and 1 CPU core. As such, the $5 Simple plan is more than enough.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">VestaCP supports a wide variety of operating systems, but for this example, we are using Ubuntu 18.04.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Additionally, for a fully-fledged website, you will need to have registered a domain name. We\u2019ll be setting up the following records once the new cloud server has been deployed. Naturally, replace the domain names shown as an example with your own.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An A records pointing your domain e.g. classic.example.com to your cloud server\u2019s public IP Address for the ClassicPress site<\/li>\n\n\n\n<li>An A records pointing e.g. vestacp.example.com to your cloud server\u2019s Public IP Address for the VestaCP Dashboard<\/li>\n\n\n\n<li>A CNAME record pointing www. to your domain e.g. www.classic.example.com to classic.example.com<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Check out the <a href=\"https:\/\/upcloud.com\/global\/docs\/guides\/domain-name-system\/\" target=\"_blank\" rel=\"noreferrer noopener\">general instructions on how to manage DNS records<\/a> if you want to learn more.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1. Setting domain name records<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In addition to pointing a domain name to your UpCloud web server, you should change the reverse DNS name to your websites\u2019 name.&nbsp;You can change the reverse DNS name by visiting your UpCloud control panel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Navigate To The Network Section under your cloud server settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click the pencil icon to&nbsp;edit the <em>Reverse DNS Name<\/em> of your public IP address:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-set-rdns-name.png\" alt=\"VestaCP set reverseDNS name\" class=\"wp-image-13411\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Note: This should be your registered domain name, for example, classic.example.com.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then copy the public IPv4 address as you\u2019ll need it to configure the A record.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The next thing you would need to do is to point an \u201cA record\u201d to your server\u2019s public IP address, this should be done via your domain registrar dashboard. You can find <a href=\"https:\/\/upcloud.com\/global\/blog\/domain-name-system\/\" target=\"_blank\" rel=\"noreferrer noopener\">general instructions here<\/a> but refer to your domain registrars for more information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you have done that, create an additional A records pointing dashboard.yourwebsite.com to your public IP address, this would be solely for accessing the VestaCP dashboard. This way, we can keep the backend separate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Lastly, create a CNAME record pointing www.classic.example.com to classic.example.com. This will be created at your domain registrar similarly to the A record.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2. Creating new user with sudo privileges<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It is highly recommended to create a non-root user account. If you have a non-root user account, you can skip this step!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here are some reasons as to why you should:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Security: Intruders\/Bots knows there is a root account, that means you are opening a known entry point which is very likely to be a target<\/li>\n\n\n\n<li>Logs: root doesn\u2019t log entry of commands but with a sudo account, every command run is logged, which helps in diagnosing a problem with the system.<\/li>\n\n\n\n<li>Minimize Disaster: root is really powerful and a little mistake when running commands can destroy the whole system, consider you mistakenly run the following command: sudo rm -r \/ home\/user, you see that space between the \/ and the home is your system directory, if you run that command, your whole system is down, which is why sudo is recommended, if you use sudo, at least, you will be prompted the password, so, luckily, you can see the mistake before you enter the password.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s create a non-root user account with sudo privileges.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Log in as root over SSH and add a new user with the following command while replacing the <span style=\"color: #ff0000;\">newuser<\/span> with your desired username:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">adduser <span style=\"color: #ff0000;\">newuser<\/span><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You will be prompted to create a new password for your new user, enter and confirm the password.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Having done that, you will be prompted to fill in your info, skip by hitting the enter key and input to verify your details.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once your new user is created, the next task is to give the new user a sudo privilege, this way we can perform administrative tasks with the sudo command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Give it a superuser privilege by running the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">usermod -aG sudo <span style=\"color: #ff0000;\">newuser<\/span><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Remember to replace <span style=\"color: #ff0000;\">newuser<\/span> with your own username.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it about creating a non-root user with sudo privileges. Continue in the next step on how to install VestaCP itself.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3. Installing Vesta Control Panel<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First, switch to the non-root account using the command below where the <span style=\"color: #ff0000;\">newuser<\/span> would be the non-root account you just created.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">su <span style=\"color: #ff0000;\">newuser<\/span><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then download bash install script using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo curl -O http:\/\/vestacp.com\/pub\/vst-install.sh<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You might be prompted for a password to confirm you are the new user, enter the password for the non-root user account and proceed by removing group admin using:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo groupdel admin<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Note: If you receive \u201cgroupdel: group \u2018admin\u2019 does not exist\u201d, kindly ignore as VestaCP will create it during the install.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, install VestaCP:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo bash vst-install.sh<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You will be asked to confirm the software you want to install on your Ubuntu server, enter y &amp; hit enter to continue, input your email and enter your FQDN (Fully Qualified Domain Name), this should be the dashboard URL: e.g vestacp.example.com:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> _|      _|  _|_|_|_|    _|_|_|  _|_|_|_|_|    _|_|<br> _|      _|  _|        _|            _|      _|    _|<br> _|      _|  _|_|_|      _|_|        _|      _|_|_|_|<br>   _|  _|    _|              _|      _|      _|    _|<br>     _|      _|_|_|_|  _|_|_|        _|      _|    _|<br><br>                                  Vesta Control Panel<br><br>The following software will be installed on your system:<br>   - Nginx Web Server<br>   - Apache Web Server (as backend)<br>   - Bind DNS Server<br>   - Exim Mail Server<br>   - Dovecot POP3\/IMAP Server<br>   - MySQL Database Server<br>   - Vsftpd FTP Server<br>   - Softaculous Plugin<br>   - Iptables Firewall + Fail2Ban<br><br>Would you like to continue [y\/n]: y<br>Please enter admin email address: admin@example.com<br>Please enter FQDN hostname [vestacp]: vestacp.example.com<br>Installation backup directory: <code>\/root\/vst_install_backups\/1581758296<\/code><br><br>Installation will take about 15 minutes ...<br><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Installation can take up to 15 minutes, this will vary depending on your cloud server\u2026<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Vesta installation script will install the control panel and configure the following dependencies for you:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Apache webserver with Nginx as the frontend. Apache will render PHP and HTML files, while Nginx will serve static files (such as images and CSS).<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Bind DNS Server<\/li>\n\n\n\n<li>Exim and Dovecot for email accounts<\/li>\n\n\n\n<li>MySQL Database Server<\/li>\n\n\n\n<li>Vsftpd FTP Server<\/li>\n\n\n\n<li>Iptables Firewall + Fail2Ban<\/li>\n\n\n\n<li>Roundcube mail client<\/li>\n\n\n\n<li>Analytics<\/li>\n\n\n\n<li>and more<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Once the script is done installing, you should see this if it successfully installed:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> _|      _|  _|_|_|_|    _|_|_|  _|_|_|_|_|    _|_|\n _|      _|  _|        _|            _|      _|    _|\n _|      _|  _|_|_|      _|_|        _|      _|_|_|_|\n   _|  _|    _|              _|      _|      _|    _|\n     _|      _|_|_|_|  _|_|_|        _|      _|    _|\n\nCongratulations, you have just successfully installed Vesta Control Panel\n\n    https:\/\/vestacp.example.com:8083\n    username: admin\n    password: T5D7yKlRdo\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4. Setting up VestaCP<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Go to the URL given to you at the end of the install.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This should be <code>https:\/\/vestacp.example.com:8083\/<\/code>, but yours will vary based on the hostname you entered at the beginning.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note: If you aren\u2019t able to access your dashboard URL, it probably has to do with the DNS propagation, it might take anywhere between 30 minutes \u2014 48 hours, use your cloud server\u2019s IP address to login instead, e.g <code>94.237.120.45:8083<\/code>. You can also check the URL using <a href=\"http:\/\/whatsmydns.net\" target=\"_blank\" rel=\"noopener\">whatsmydns.net<\/a> to see if your name record has propagated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You will get an SSL warning has shown below, kindly click on <em>Advance<\/em> and <em>Proceed.<\/em> The warning is normal on the first time accessing a site that is using a self-signed certificate:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-not-private-continue2.png\" alt=\"VestaCP not private continue\" class=\"wp-image-13416\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Log in with the username and password Vesta generated for you at the end of the installation output.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-login.png\" alt=\"VestaCP login\" class=\"wp-image-13417\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Next, you should change your Vestacp password. Hover over the admin user and click <em>Edit<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-edit-admin.png\" alt=\"VestaCP edit admin\" class=\"wp-image-13418\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can either let Vesta generates the password for you or set it yourself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also change other settings, for example, the user\u2019s first and last name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can leave the Nameserver as is or you can change it to use your own Nameserver if you have one.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click <em>Save<\/em> when you are done with the settings, take your time!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When you are done updating the admin user details, navigate to the <em>Web<\/em> section and click the <em>Add Web Domain<\/em> button revealed by mousing over the plus icon:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-add-domain.png\" alt=\"VestaCP add domain\" class=\"wp-image-13419\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Add your domain name and change the IP address to your cloud server\u2019s public IP address. Then make the following selections:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>DNS Support \u2014 check<\/li>\n\n\n\n<li>Mail Support \u2014 check<\/li>\n\n\n\n<li>Click Advanced Options, and use the following setting:<br>Aliases should be e.g. <span style=\"color: #ff0000;\"><code>www.vestacp.example.com<\/code><\/span>, this way your user can access your website using <code>www<\/code><\/li>\n\n\n\n<li>Proxy Support \u2014 check<\/li>\n\n\n\n<li>(Optional) SSL Support \u2014 check\n<ul class=\"wp-block-list\">\n<li>Let\u2019s Encrypt Support \u2014 check<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>(Optional) Web statistics \u2014 choose Awstats\n<ul class=\"wp-block-list\">\n<li>Statistics authorization \u2014 check, and add a unique user &amp; pass<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>(Optional) Additional FTP \u2014 If you feel you need one for uploading files to your server, check and create the user and pass, leave the path as is<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Once done, click the <em>Add<\/em> button to confirm.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-configure-domain.png\" alt=\"VestaCP configure domain\" class=\"wp-image-13421\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Access your website URL (e.g classic.example.com) and you should see the default page:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-default-index.png\" alt=\"VestaCP default index\" class=\"wp-image-13422\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can also enable email configuration by going to the mail section and mouse over the domain you want to add the email support.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the following settings:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Account \u2013 your username<\/li>\n\n\n\n<li>Password \u2013 Add a unique one and click \u201c<em>Advanced Options<\/em>\u201c<\/li>\n\n\n\n<li>Quota \u2013 It allows you to set a mailbox size limit. Also, You can press the infinity icon to give it an unlimited storage<\/li>\n\n\n\n<li>Aliases \u2013 It allows you to add other email addresses that forward to that main account, you don\u2019t need this in most cases. The only case you might need one is when you<br>have an email account on another service, and you want to keep your emails on that service<\/li>\n\n\n\n<li>Forward To \u2013 If you want to forward mails to other email services, you would want to check \u201cDo not store forwarded mail\u201d to save server resources.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Send login credentials to the email address \u2013 Send login credentials to an available email of yours and click Add.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5. Option 1. Installing ClassicPress via Softaculous<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Softaculous is included in VestaCP and installed by default. It is useful for installing scripts among others are ClassicPress, Presta, Joomla, Abantecart, and WordPress.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, ClassicPress isn\u2019t available in the free version of Softaculous. You can either use the Softaculous one-month free trial to one-time install ClassicPress or download it manually as shown in the option 2. below.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Visit <a href=\"https:\/\/www.softaculous.com\/softaculous\/trial\" target=\"_blank\" rel=\"noopener\">Softaculous Free Premium<\/a> for the free trial, enter your cloud server public IP and click the <em>Issue License<\/em>&nbsp;button:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-softaculous-trial.png\" alt=\"VestaCP Softaculous trial\" class=\"wp-image-13424\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This might take a few minutes to process. If you want to speed it up, go to VestaCP App section and click the Admin Panel for Softaculous at <code>\/softaculous\/index.php?ap=1&amp;<\/code> on your Vesta Control Panel domain.<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/vestacp.example.com:8083\/softaculous\/index.php?ap=1&#038;\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Then on the Softaculous Admin Home page, click the link to <em>Refresh the License<\/em> under the <em>Software Info<\/em> section and your free premium trial should activate.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-softaculous-refresh-license.png\" alt=\"VestaCP Softaculous refresh license\" class=\"wp-image-13425\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once you are done, head back to Softaculous app section, and search for ClassicPress, then click the app name under the search field as it comes up.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-softaculous-apps.png\" alt=\"VestaCP Softaculous apps\" class=\"wp-image-13427\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You should see the ClassicPress Installation Page, hover over the <em>Install<\/em> and choose <em>Custom Install<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-softaculous-install-classicpress.png\" alt=\"VestaCP Softaculous install ClassicPress\" class=\"wp-image-13428\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Use the following setting to complete the installation:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Software Setup \u2014 Your protocol should either be https\/\/ or https\/\/www, select your domain name, and make sure the \u201cIn Directory\u201d is blank<\/li>\n\n\n\n<li>Site Settings \u2014 Add the website name and your preferred description<\/li>\n\n\n\n<li>Admin Account \u2014 You need this to access your admin panel; input user, pass and email of the account<\/li>\n\n\n\n<li>Enter your email in the Email installation details, and Install<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-softaculous-install-classicpress2.png\" alt=\"VestaCP Softaculous install ClassicPress\" class=\"wp-image-13429\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The Installation will take a few seconds and once done, you should be given the following details:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-softaculous-classicpress-installed.png\" alt=\"VestaCP Softaculous ClassicPress installed\" class=\"wp-image-13431\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Access the admin dashboard e.g <code>https:\/\/classic.example.com\/wp-admin<\/code>, and that\u2019s it about installing via Softaculous.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5. Option 2. Installing ClassicPress manually<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Fire up your console and Change to your website&#8217;s public directory:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd \/home\/admin\/web\/classic.example.com\/public_html<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Download a copy of the latest ClassicPress file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo wget https:\/\/github.com\/ClassicPress\/ClassicPress-release\/archive\/1.1.2.zip<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Unzip the downloaded zip file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo unzip 1.1.2.zip<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Clean up the zip file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo rm 1.1.2.zip<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Issue a recursive copy to <tt>\/home\/admin\/web\/<span style=\"color: #ff0000;\">classic.example.com<\/span>\/public_html<\/tt>, while replacing the example domain with your own.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo cp -r ClassicPress-release-1.1.2\/* \/home\/admin\/web\/<span style=\"color: #ff0000;\">classic.example.com<\/span>\/public_html<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can delete the ClassicPress archive directory if you want:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo rm -r ClassicPress-release-1.1.2<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The next step is to create a MySQL database for ClassicPress:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-add-database.png\" alt=\"VestaCP add database\" class=\"wp-image-13434\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now, create your database, this is what we would be using in the wp-config file:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-add-database2.png\" alt=\"VestaCP add database \" class=\"wp-image-13435\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The next step is to edit the wp-config file, but first, let\u2019s rename it first:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mv wp-config-sample.php wp-config.php<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Open wp-config.php and replace:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano wp-config.php<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Note: You can also use FTP to edit the config settings<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>DB_NAME \u2013 The name of the database you created In VestaCP Database<\/li>\n\n\n\n<li>DB_USER \u2013 The username of the database you created In VestaCP Database<\/li>\n\n\n\n<li>DB_PASSWORD \u2013 The password of the database you created In VestaCP Database<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you are using the nano editor, you can use CTRL + X to save by entering Y to confirm your action.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note: You can also connect to your FTP server to make the changes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The next step is to generate a salt and keys for better website security.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run the following command to generate salts for your wp-config.php:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">curl -s https:\/\/api-v1.classicpress.net\/secret-key\/1.0\/salt\/<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Alternatively, if you don\u2019t want to rely on a remote service to generate the keys for you, you can run this one-line command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">python -c \"import random; import string; r = random.SystemRandom(); print(chr(10).join('define( {q}{0}{q}{1}, {q}{2}{q} );'.format(key,' '*(16-len(key)),''.join(r.choice(string.ascii_letters+string.digits)for _ in range(64)),q=chr(39))for key in 'AUTH_KEY SECURE_AUTH_KEY LOGGED_IN_KEY NONCE_KEY AUTH_SALT SECURE_AUTH_SALT LOGGED_IN_SALT NONCE_SALT'.split(' ')))\"<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should get something similar:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">define('AUTH_KEY',         '*;xmjy!C&amp;XL|-vl|bq,2!YffCev@ tdl(]6&lt;qfMz0VrIGw}\/F-0b^U[ludO|UWYB'); \ndefine('SECURE_AUTH_KEY',  'z{%35CIgE*RMT1O?W&gt;*C;_xi8]c.[~]Nuv#N;=v}}\/,&gt;e[jRPa=jyDiVEgInTS\/D');\ndefine('LOGGED_IN_KEY',    'Ye&gt;D MKmYavj-;i7P2\/Wv3Okj_79K$|rQgF}j^{^F,{y=U80&lt;p-!,8P)S5H5i&gt;ih');\ndefine('NONCE_KEY',        'lLgedy&gt;SCA2V6-x|ozF4q*HW\/sI6QvthDIl[c&amp;t+v-FDHZA-+J%c,#miK|Wg@,|\/');\ndefine('AUTH_SALT',        '55lvI7Zw7l[q$%n=5`mE]b]Tt]ka`vG&amp;N*#`&amp;qbjO+~YunMv``=oQBeb9VK}{f=S');\ndefine('SECURE_AUTH_SALT', '%JTKXx+U)|v 6)X\/e1{HjLGdnsz,]:&gt;oi4Qaj7C+,)UX7&lt;Yy-=zQp`~r%-`3(\/#l');\ndefine('LOGGED_IN_SALT',   'a?@S:~KsarWWihO-|uoxCLwqaeW@ BEBs0*496FNrW71*787ADoNN4C}6XWN0jPJ');\ndefine('NONCE_SALT',       '}2Qt1+H;E4`AJCx4h?2.ST@$ir*Ad_j^g.Y9B[o2p$|1j=l&gt;z&gt;BZOUGVRj}eK;=d');\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace corresponding lines in your wp-config.php:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano wp-config.php<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you are using the nano editor, make sure you save by using CTRL + X and confirm by pressing Y.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Afterwards, open the <tt>\/wp-admin\/install.php<\/tt> at your ClassicPress site, e.g. <code>https:\/\/classic.example.com\/wp-admin\/install.php<\/code> to complete the installation:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/classicpress-admin-setup.png\" alt=\"ClassicPress admin setup\" class=\"wp-image-13433\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once the installation is complete, log in and you have successfully created a ClassicPress website.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Optional 1: Creating a new SSH key for the new user (Recommended)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">SSH is more secure than using a password to log in to your server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SSH helps to communicate remotely with another computer, and it ensures the exchange of data is encrypted.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Learn <a href=\"https:\/\/upcloud.com\/global\/docs\/guides\/use-ssh-keys-authentication\/\" target=\"_blank\" rel=\"noreferrer noopener\">how to use SSH keys authentication<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Optional 2: Change VestaCP&#8217;s default login port for stronger server security (Recommended)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As you probably know by now that VestaCP uses 8083 as the default port for its login control panel, which could be an open can of worms for bots\/intruders.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To mitigate this, we would change and block VestaCP\u2019s default port.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Login to your Vesta panel and navigate to the <em>Firewall<\/em> section and click the <em>Add Rule<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-add-firewall-rule.png\" alt=\"VestaCP add firewall rule\" class=\"wp-image-13439\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Then configure the following settings:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Action \u2013 Accept<\/li>\n\n\n\n<li>Change the port (I\u2019ll be using 4950, use whatever soothes you),<\/li>\n\n\n\n<li>Protocol \u2013 TCP<\/li>\n\n\n\n<li>IP address \u2013 0.0.0.0\/0<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Then click <em>Add<\/em>, to add the new port to your Firewall.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-add-firewall-rule-vesta.png\" alt=\"VestaCP add firewall rule Vesta\" class=\"wp-image-13440\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The next thing is editing Vesta Nginx config to listen to the new port.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Login to your server with a non-root user account that has sudo privileges, then run the following command:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Replace the default port with the one you added (I am using 4950):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo sed -i 's\/8083;\/4950;\/' \/usr\/local\/vesta\/nginx\/conf\/nginx.conf<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Alternatively, you could open the config file in a text editor:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano \/usr\/local\/vesta\/nginx\/conf\/nginx.conf<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">and you then find and replace 8083.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Restart Vesta Service:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo service vesta restart<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, you can log in to your panel using the new port, e.g. <code>https:\/\/vestacp.example.com:4950\/<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Remove the old port by hovering over the rule for port 8083 and clicking <em>Delete<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/vestacp-delete-firewall-rule.png\" alt=\"VestaCP delete firewall rule\" class=\"wp-image-13441\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And that\u2019s it about creating a new port.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing security updates<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To begin installing security updates, the first thing is to update your repository index, which would instruct the server to check all lists of packages that are new or outdated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run the following command to update your repo:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt update<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once, you\u2019ve done that, you will need to upgrade them if any new packages are available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can either run<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt upgrade<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt dist-upgrade<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The difference here is that the apt upgrade will automatically install an update without removing any packages while the apt dist-upgrade will update new packages, install new packages as a dependency of the upgraded packages and remove packages that are broken by upgraded packages.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting the most common installation problems<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Getting an Error connecting to the database<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The error establishing a database connection error simply means that ClassicPress was unable to connect to your MySQL database which is likely due to incorrect database information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To fix this, Open the wp-config file again just like we did before and carefully reenter the database login information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Being asked for FTP credentials:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ClassicPress would prompt you for FTP credentials if it does not have the proper file permission.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To fix this, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo chown -R admin:admin \/home\/admin\/web\/yourdomainname.com\/public_html<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That should fix it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The INFO.XML file could not be found<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you get an error on Softaculous reporting the INFO.XML file missing, log into your cloud server with the root account and run the following command to update and download the required scripts:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo \/usr\/local\/vesta\/php\/bin\/php \/usr\/local\/vesta\/softaculous\/cron.php<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You may get a message about other missing files but the INFO.XML file should get added as required.<\/p>\n","protected":false},"author":31,"featured_media":13452,"comment_status":"open","ping_status":"closed","template":"","community-category":[223,277],"class_list":["post-2182","tutorial","type-tutorial","status-publish","has-post-thumbnail","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial\/2182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial"}],"about":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/types\/tutorial"}],"author":[{"embeddable":true,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/comments?post=2182"}],"version-history":[{"count":0,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial\/2182\/revisions"}],"wp:attachment":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/media?parent=2182"}],"wp:term":[{"taxonomy":"community-category","embeddable":true,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/community-category?post=2182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}