Category: Cloud Education

  • How To Install Mautic Marketing Automation Software in RunCloud (2020 Update)

    How To Install Mautic Marketing Automation Software in RunCloud (2020 Update)

    Mautic is powerful marketing automation software. It is free and it is also the world largest open-source marketing automation project.

    More than 200.000+ organizations use Mautic. It makes Mautic an excellent choice if you want to run email marketing campaigns and marketing automation directly from your server, with full total control.

    runcloud-mautic-13-dashboard

    In this post, we will discuss about how to install Mautic using RunCloud easily.

    Get Your Cloud Server And Connect To RunCloud

    Cloud server is the best choice when you want to run your business with Mautic. It makes Mautic stable and also scalable. When your business start growing and Mautic needs more server resources, you can increase the resources (RAM/CPU) of your cloud server easily, anytime.

    Five dollar ($5) cloud server from DigitalOcean / Linode / Vultr / UpCloud / other provider is more than enough to start using Mautic.

    Quick guide on how to setup and connect your server to RunCloud

    Create PHP Web Application In RunCloud

    After setup and connect your server to RunCloud, you can create PHP web application to install Mautic.

    Using RunCloud, you can create multiple website (web applications) in one server. Basically you can install Mautic on the same server where you host your other websites using RunCloud.

    Go to “Web Application” menu under your server in RunCloud, and click “Create Web App” button.

    runcloud-mautic-01-create-new-php-webapp

    Let’s create your PHP web application for Mautic.

    For “Web Application Name“, you can use “mauticapp“.

    For “Domain name“, you can use either your own domain/subdomain or RunCloud test domain. For this example, we will use RunCloud test domain.

    If you decide use your own domain, you will need to do an extra step to configure DNS record and wait for DNS propagation.

    You can read our quick guide on how to add your domain.

    For “Web Application Owner“, you can create new “mauticuser” system user.

    It is best practice to use different system user for different web application in the same server, for extra security purpose.

    runcloud-mautic-03-php73-version-advanced-settings

    For “PHP Version“, you can select PHP7.3 to install Mautic v2.16 stable release. Please do not use PHP7.4 because Mautic still do not officially support it.

    For “Web Application Stack“, you can choose “Nginx + Apache2 Hybrid” to allow you use .httaccess file in Mautic.

    Please click “Advanced Settings” checkbox to configure some extra settings to make your Mautic installation run smoothly.

    For date.timezone, you can select your current timezone where you run your business.

    For disable_functions, it is optional, you can remove all php_posix functions from the list.

    The php_posix is disabled by default inside RunCloud for security reason. For Mautic installation, it is just a recommendation to enable php_posix, not a requirement. But if you really want to enable php_posix, you can replace all the disable_functions with the text below.

    getmyuid,passthru,leak,listen,diskfreespace,tmpfile,link,ignore_user_abord,shell_exec,dl,set_time_limit,exec,system,highlight_file,source,show_source,fpassthru,virtual,proc_open,proc_close,proc_nice,proc_terminate,escapeshellcmd,ini_alter,popen,pcntl_exec,socket_accept,socket_bind,socket_clear_error,socket_close,socket_connect,curl_multi_exec,symlink,ini_alter,socket_listen,socket_create_listen,socket_read,socket_create_pair,stream_socket_server

    For max_execution_time, please increase the value to 120 to avoid any timeout / error issue on the installation process.

    Then, click “Add Web Application” button to create your PHP web application for Mautic.

    Prepare Mautic Installer

    There are two ways to prepare Mautic installer:

    1. Download Mautic installer files and upload it to your web application using SFTP.
    2. Download and extract Mautic installer files using SSH.

    In this post, we will show you the second way, using SSH.

    You need to login to your server using SSH from either Terminal (Mac/Linux) or PowerShell / Putty (Windows).

    If you want to login using password, not using SSH key, you will need to change the password of “mauticuser” system user that you have created from System User menu.

    If you use Terminal, you can run this command to login to your server.

    ssh mauticuser@<youripaddress>

    You will login to your server using “mauticuser” system user, not root. Please change “youripaddress” with the IP Address of your server.

    NOTE: Please do not login using “root”, to avoid any file/folder permission issue.

    Change the working directory to your “mauticapp” web application root path.

    cd webapps/mauticapp

    Download the Mautic script. The download might be a bit slow. Just wait for it to finish.

    wget https://www.mautic.org/download/latest -O mautic.zip

    Unzip/extract the downloaded file.

    unzip mautic.zip

    Run Mautic Installer

    After preparing your Mautic installer, you can visit your domain/subdomain where you install Mautic.

    Mautic recommends to secure your installation with an SSL certificate. You can skip this step if you use RunCloud free domain.

    If you use your own domain/subdomain, you can install Let’s Encrypt SSL Certificate to your website. You can read our quick guide to secure your website with HTTPS.

    Click “Next Step” button.

    Mautic Installation – Database Setup

    runcloud-mautic-09-database-setup

    You need to create MySQL database to install Mautic. Go to “Database” menu under your server in RunCloud.

    runcloud-mautic-06-create-database

    Click “Create Database” button and create new “mauticdb” database.

    runcloud-mautic-07-create-database-user

    Click “Create Database User” button and create new “mauticdbuser” database user.

    Then click “Grant User” button in your “mauticdb” database to connect it to “mauticdbuser” user.

    Now you continue database setup process using database name and user that you have created.

    Click “Next Step” button.

    Mautic Installation – Administrative User

    In this step, you can create the admin user for your Mautic installation.

    Click “Next Step” button.

    NOTE: If you get Error 500 screen after clicking “Next Step” button, it is possible because you have permission issue or you do not increase max_execution_time when creating PHP web application above.

    You can fix it by running this command on your web application root path.

    rm -rf app/cache/*
    chmod 777 app/cache
    php app/console cache:warmup

    Mautic Installation – Email Configuration

    In this step, you can setup Mautic email configuration. Mautic support sending email using PHP Mail, but we highly recommend you to use third party SMTP, for example SendGrid, Mailgun, or Amazon SES.

    You can skip this step for now and setup email configuration later from your Mautic dashboard.

    Click “Next Step” button.

    Perfect!

    When you see Mautic login screen, it means you have installed Mautic successfully!

    Setup Mautic Cron Jobs

    Mautic requires some cron jobs to run some maintenance tasks. You need to setup cron jobs to make sure Mautic can run properly.

    Fortunately, you can add cron jobs easily using RunCloud.

    Go to “Cron Job” menu under your server in RunCloud, and click “Create” button to create our first Mautic cron job.

    Cron Job – Updating Contact Segments (Required)

    runcloud-mautic-14-setup-cron-job

    For “Job Label”, add mautic:segments:update

    For “User”, add mauticuser, your system user for this Mautic web app.

    For “Vendor Binary”, select /RunCloud/Packages/php73rc/bin/php because you use PHP7.3 for this Mautic web app.

    For “Command”, copy paste this command below.

    /home/mauticuser/webapps/mauticapp/app/console mautic:segments:update

    NOTE: Please update this command if you use different system user (not mauticuser) and web application name (not mauticapp).

    Because Mautic use multiple cron jobs, it is HIGHLY recommended that you stagger the required jobs so as to not run the exact same minute.

    For “Minute”, please use 0,15,30,45 to run this cron job every 15 minutes. We will use different minutes for different cron jobs.

    Click “Create Cron Job” button.

    Cron Job – Updating Campaigns (Required)

    Please repeat the process for following cron job.

    Label : mautic:campaigns:update

    Campaign :

    /home/mauticuser/webapps/mauticapp/app/console mautic:campaigns:update

    Minute : 5,20,35,50

    Cron Job – Executing Campaign Events (Required)

    Please repeat the process for following cron job.

    Label : mautic:campaigns:trigger

    Campaign :

    /home/mauticuser/webapps/mauticapp/app/console mautic:campaigns:trigger

    Minute : 10,25,40,55

    Cron Job – Processing Email Queue (Optional)

    Please repeat the process for following cron job.

    Label : mautic:emails:send

    Campaign :

    /home/mauticuser/webapps/mauticapp/app/console mautic:emails:send

    Minute : 2,17,32,47

    Perfect!

    You have completed cron jobs setup for Mautic.

    Please check this article if you want to setup other optional cron jobs in Mautic.

    Summary

    If you want to use Mautic for your marketing automation software, using RunCloud and cloud server is a perfect combination to install and run Mautic Marketing Automation Software.

    Are you using Mautic with RunCloud? Do not hesitate to share your experience with us.

  • How To Use Redis Object Cache To Speed Up Dynamic WordPress Site

    How To Use Redis Object Cache To Speed Up Dynamic WordPress Site

    With RunCloud, you don’t need to be a Linux expert to host high-performance WordPress websites, both “static” WordPress sites (simple blog) and “dynamic” WordPress sites (WooCommerce and membership).

    For any types of highly dynamic websites, you can use Redis Object Cache to use less database resources by caching the results of complex database queries, speed up PHP execution time in your server, and make your dynamic website load much faster.

    In this blog post, we will explain Redis Object Cache, which is probably not a term that many WordPress users are familiar with.

    WordPress Caching System

    WordPress users usually understand at least two caching systems: page caching and browser caching.

    Actually, there are many caching system in WordPress, for example:

    • page caching
    • browser caching
    • database caching
    • object caching
    • transient caching
    • fragment caching
    • opcode caching
    • CDN caching

    In RunCloud, we divide them into three types:

    1. Server-side Caching: caching at the server level. NGINX page caching (RunCloud Hub) and Varnish page caching are two examples of server-side caching.
      • They are not available on regular shared hosting.
      • You will need a VPS / Dedicated server to allow you to optimize your website using server-side caching.
      • Another example of server-side caching is “persistent” object caching.
    2. WordPress-side Caching: caching at the WordPress level. Page caching feature of many popular caching WordPress plugins is one example of WordPress-side caching.
      • You can control it from your WordPress dashboard.
    3. Client-side Caching: caching at the local browser level. Browser cache is an example of client-side caching.
      • Once you visit your website, your browser saves the static data of your website, such as images, CSS, and javascript files.
      • Everytime you visit your website again or hit the F5 button to refresh your website, static data will be served from the local browser cache.

    For this post, we will only be covering the object cache, specifically Redis Object Cache.

    What is Redis Object Cache

    If page caching works on caching the HTML page output, then object caching works on caching your database queries.

    WordPress has special WP_Object_Cache class for caching the result of complex database queries, which may be computationally expensive to regenerate, to reduce your server load.

    By default, the object caching is non-persistent, data stored in the cache resides in memory only and only for the duration of the request.

    We can make it persistent, cached data can be used across page loads, by using persistent object caching system, for example:

    • Redis Object Cache
    • Memchached Object Cache
    • APC / APCu Object Cache
    • File-based Object Cache

    Redis Object Cache is the first choice because it is very popular and used by many popular websites like Twitter, GitHub, Weibo, Pinterest, Snapchat, Craigslist, Digg, StackOverflow, Flickr, and many others.

    When a user visits a WordPress page, many complex database queries are performed on your server and the results are cached by Redis Object Cache.

    When another user visits the same WordPress page, your website will not perform the same complex database queries again, because the results are already cached and served by the Redis Object Cache.

    It will reduce your database queries, reduce your server load, and make your dynamic WordPress site load faster.

    Who Need Redis Object Cache

    Page caching is enough for many WordPress sites, especially for blogs, magazines, news, and company profile websites.

    But if your WordPress site has many dynamic pages, page caching will be not enough because your dynamic pages should be not cached using page caching.

    For example, Redis Object Cache will be very useful for these dynamic websites to reduce your MySQL database load and make your dynamic pages load faster.

    • E-commerce websites using WooCommerce, Easy Digital Downloads, etc. Your cart, checkout, and my account pages are dynamic pages.
    • Membership websites. Your member area and some password protected pages are dynamic pages.
    • Forums and Social Networking websites using BBPress, BuddyPress, etc.

    How To Use Redis Object Cache

    Redis Object Cache is a server-side caching, and it requires Redis to be installed and activated in your server.

    For RunCloud users, there is no need to install Redis yourself, as Redis has been installed to your server.

    It saves your time dealing with the linux command to install Redis. It can be complicated for common users with minimum linux knowledge.

    In RunCloud, there are two ways to use Redis Object Cache.

    1. RunCloud Hub WordPress Plugin
    2. Redis Object Cache WordPress Plugin

    How To Install Redis Object Cache Using RunCloud Hub

    RunCloud Hub is a hub for all RunCloud plugins for WordPress. It is not only for Redis Object Cache, but also RunCache (Nginx server-side caching) and Server Health & Transfer Stats monitoring directly from your WordPress dashboard.

    If you want to use a combination of Nginx page caching and Redis object caching, then RunCloud Hub is the perfect choice for you.

    You can read the complete guide on how to install RunCloud hub here.

    Once you have installed the RunCloud Hub plugin, Redis Object Cache is automatically installed and enabled in your WordPress website, no complex process required.

    runcloud-redis-object-cache-runcloud-hub

    You can also disable Redis Object Cache temporarily by unchecking “Handle Object Cache” option under Redis settings in RunCloud Hub page.

    How To Install Redis Object Cache Using Redis Object Cache WordPress Plugin

    If you do not want to use RunCache (Nginx page caching) in RunCloud Hub, and only want to use Redis Object Cache, you can use Redis Object Cache WordPress Plugin.

    First, you need to run Redis on your RunCloud server. Redis has been installed in your server, but it is probably inactive. Go to Services menu under your server in RunCloud, and enable Redis.

    Second, install and activate Redis Object Cache WordPress Plugin.

    Third, enable the object cache under Settings – Redis, or in Multisite setups under Network Admin – Settings – Redis.

    runcloud-redis-object-cache-wordpress-plugin

    Note: If you use Redis Object Cache in multiple websites (web applications) in single RunCloud servers, you have to add WP_CACHE_KEY_SALT constant to wp-config.php of each web applications. Please read plugin documentation for more details.

    How To Check If Redis Object Cache Works

    Redis Object Cache works by reducing your complex database queries. We can monitor and compare the database queries before and after using Redis Object Caches.

    You can install and activate Query Monitor WordPress plugin to help you monitor the number of database queries in a WordPress website.

    In this example, we use a default WordPress installation with Twenty Nineteen WordPress theme.

    runcloud-redis-object-cache-dashboard-before
    Redis Object Cache in WordPress Dashboard page (BEFORE)
    runcloud-redis-object-cache-dashboard-after
    Redis Object Cache in WordPress Dashboard page (AFTER)

    In WordPress dashboard, Redis Object Cache can reduce the number of database queries from 25 to 10 queries only.

    runcloud-redis-object-cache-frontend-before
    Redis Object Cache in WordPress Homepage (BEFORE)
    runcloud-redis-object-cache-frontend-after
    Redis Object Cache in WordPress Homepage (AFTER)

    In WordPress homepage, Redis Object Cache can reduce the number of database queries from 18 to 5 queries only.

    You can imagine when you use Redis Object Cache in a WooCommerce (ecommerce) website, where the number of database queries in your WordPress can be 50-100 queries per page, Redis Object Cache can help a lot!

    Summary

    Redis Object Cache is a very useful feature to speed up dynamic WordPress sites, especially ecommerce (WooCommerce) and membership sites by reducing database load to make your dynamic pages load faster.

    All paid plan users (Basic, Pro, Business) can enjoy the full functionality of this feature.

    Never ever hesitate to suggest new features that you want to see, and we will make it happen.

  • How to Easily Clone a Web Application in RunCloud

    How to Easily Clone a Web Application in RunCloud

    Cloning a website is not an easy task and requires some knowledge of FTP, sFTP, or SSH. From there, you will need to backup all files, any databases, copy those files, move them to the new server, import the database into a new server, change over your WordPress configuration file information, update the database to reflect any of those changes, update WordPress settings to match the old website, checking to ensure everything was copied over, and so on and so forth. You get the point that this is a painfully tedious process for any user and can be very time-consuming, especially where there are multiple websites involved.

    We are introducing a Clone Web Application feature in RunCloud to clone your website (web application) easily.

    Cloning A Website (Web Application) in RunCloud

    This feature allows you to clone a web application within the same server or clone it to a different server within your RunCloud account.

    And we support cloning both custom PHP web applications and WordPress web applications. It means you can clone an existing web application within your RunCloud account.

    You can find “Clone Web App” in the menu under Tools menu within your RunCloud web application.

    Cloning A Web Application To A Different Server

    For the advanced, cloning a web application to the same server might involve some Linux commands and an import of the database, but to move it to a completely different server entirely might take some time and knowledge. We make it easier for you.

    If you clone a WordPress web application or PHP application (for example Laravel) that has a database, you don’t want to forget to clone the database in the process. Missing a table from the database or an important file can cause errors and prevent a website from functioning.

    After you have clicked the Clone Web App button, you will be taken into a screen that will allow you to set which server you would like to clone to, the port to use, the web application owner, and the settings for the database. Once you have entered in all of this information, click Clone Webapp to Server button to start the process.

    While cloning is not an instant process, RunCloud takes care of the entire process making your life easy with just a few button clicks. When cloning a web application to a different server, an exact copy of your web application will be transferred using the same configurations. The whole process takes just a few moments to clone all of your files, the database, and WordPress settings.

    You can even monitor the progress by clicking on the Notification icon at the top right.

    Done! Now your web application has been cloned to a different server within your RunCloud account.

    If you want to switch your live website to this cloned web app, you need to continue with by changing your A records in your DNS management service. Do not forget to check your domain name settings and also re-deploy Let’s Encrypt SSL/TLS in your cloned web app if you want to secure it with HTTPS.

    Cloning A Web Application Within The Same Server

    Cloning a web application within the same server is useful, for example, if you want to create a different project from an existing web app, without starting from scratch.

    If you use WordPress and you want to clone your web app for development purposes, do not use this feature, as it is better to use One-Click WordPress Staging that will give you additional features to sync/merge between your production and staging website.

    However, if you want to create an entirely new website that is similar, but might contain different content, such as a website branching off another, you might consider using this feature.

    Another use case might be if you are teaching a classroom of students and setting up a server, and you want all of the students to use the same website setup, then you could clone the website multiple times to the same server.

    When cloning web applications within the same server, it is highly advised to make sure to use a different name for both web application and database name. Upon finalizing the setup, click “Clone this webapp” button to begin the process.

    Cloning a web application within the same server is usually faster compared to cloning to a different server. You can monitor the progress by clicking the Notification icon at the top right. It will give you the details of RunCloud cloning your web application.

    Done! Now you have cloned your website within the same server.

    Summary

    Clone Web Application feature is very useful to clone/duplicate your existing web application quickly, within the same server or to a different server within your RunCloud account.

    Pro and Business plan users can enjoy the full functionality of this feature. For Basic plan users, this feature is available to try until 1st June 2020, and you are only able to clone web applications within the same server.

    When it comes to our users, we know RunCloud is important to you, and you rely on its services. We are always listening to what your pains are, and we want to solve them and make your life easier.

    The web app cloning feature has been a largely requested feature, receiving 218 upvotes that we knew would be useful to you. Never ever hesitate to suggest new features that you want to see, and we will make it happen.

  • 3 Free Ways To Migrate WordPress From Shared Hosting To Cloud Server

    3 Free Ways To Migrate WordPress From Shared Hosting To Cloud Server

    WordPress Migration From Shared To Cloud

    You probably start your website hosting from a small shared hosting account. As your website grows, you will hit the limitations of shared hosting, and then you know it is time to consider moving to a better hosting environment like cloud hosting. Cloud hosting is more reliable, higher scalability, flexible pricing, better security, and performance. Find out why cloud hosting is better for your business.

    In this article, you will learn the various ways to migrate WordPress site from shared hosting to cloud hosting

    7 Steps to Migrate a Website

    Generally, in order to move a website from one location to another, you will have to copy all of the data including files and database. There are many ways to do it, and here are the steps:

    1. Backup! Always keep at least a recent backup of your website before you do anything
    2. Export files from current website
    3. Export database from current website
    4. Create a hosting account on the new server
    5. Upload files to a new website
    6. Import database to the new website
    7. Update DNS records

    At RunCloud, we have the migration service to migrate your website from the other web hosting server (shared hosting) to a RunCloud managed a server. It is free for the first web application!

    If you would like to do it yourself, here are some methods to migrate your website from shared hosting to cloud hosting. We will use WordPress, the most popular CMS in the world, as an example.

    1. WordPress Migration Plugin: Migrate Guru

    migrate guru wordpress migration plugin

    Migrate Guru is a WordPress migration plugin from BlogVault, a WordPress backup solution company. The beauty of Migrate Guru is that it is a free one-click migration plugin that supports unlimited sized websites, from 50MB or 50GB website.

    The migration process works on their server, so it won’t overload your server. No extra disk storage is required. Your files are copied to their server and deleted after the migration is complete. It also automatically rewrites URLs, bypasses import-export scripts, and handles serialized data.

    Requirements:
    • Migrate Guru plugin installed on existing WordPress site
    • A WordPress installation on new cloud hosting
    • FTP/SFTP access to new cloud hosting

    How to use Migrate Guru to migrate WordPress site

    1. Click on Migrate Guru from the sidebar menu in WordPress dashboard
    2. Fill in your email address then click “Migrate Site”
    3. On the new page, select FTP
    4. Enter FTP details, including destination site URL and directory path
    5. Click the “Migrate” button to start the migration
    6. Make a cup of coffee. You will be notified by email once the migration completed
    7. Enjoy your speedy site on new cloud hosting

    2. WordPress Migration Plugin: All-in-one WP Migration

    All-in-one WP Migration is one of the most popular WordPress migration plugins with over 2 millions active installations and 5,200+ 5 stars rating. The plugin is highly compatible with different operating systems and web hosting providers. It does not require any PHP extensions and works with all PHP versions from PHP 5.2 onwards. It supports WordPress version 3.3 to the latest version.

    Requirement:

    • All-in-one WP Migration installed on both current a new WordPress site

    How to use All-in-one WP Migration to Migrate A WordPress site

    a. Current server

    all in one wp migrate wordpress plugin
    1. On the current WordPress dashboard, click on “All-In-One WP Migration” > export
    2. (Optional) Use the Find Replace within the database to replace existing domain name, if you change the website domain name on the new server
    3. Click “EXPORT TO” and select FILE to download the website export file (.wpress file extension)

    b. New server

    all in one wp migrate import site
    1. On new cloud hosting WordPress dashboard, click on “All-In-One WP Migration” > import
    2. Click “IMPORT FROM” > FILE (or your .wpress export file source)
    3. Select your website export file (.wpress) to start website import
    4. Click the “Proceed” button to overwrite the WordPress site with your All-in-one WP migration export file.
    5. “Your site has been imported successfully!”

    Note:

    • The free plugin has a 512MB upload limit for importing website
    • You can buy the Unlimited extension to remove the import limit, restore a backup from the server, and support WP-CLI commands. Other cloud storage extensions are available too.
    • You may need to save the WordPress permalink structure twice after import complete.

    3. WordPress Migration with WP-CLI and Rsync

    Using WP-CLI and Rsync is the fastest way to migrate a WordPress site. It is more stable and reliable than using a WordPress plugin. Recommended if you want to migrate a huge website and you have SSH access on both existing and new servers.

    WP CLI is a powerful command line tool for managing WordPress. You can install WordPress. update plugins configure multisite, and much more, without using a web browser.

    Rsync is a Linux command line tool for fast local and remote file synchronization. It is a popular tool and included in most Linux distribution by default. Digital Ocean has a good tutorial on using Rsync to sync directories on the server.

    Requirement:

    • SSH access on both current and new servers
    • WP-CLI on both current and new servers

    How To Install WP-CLI

    You can easily install WP-CLI via shell with two command lines:

    sudo wget -q https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -O /usr/bin/wp
    sudo chmod 755 /usr/bin/wp

    How to use WP-CLI and Rsync to migrate WordPress site

    a. Current server

    1. Connect to the current server via SSH
    2. Navigate to your WordPress root directory (example: /var/www/vhosts/sitename/public_html/)
    3. Export WordPress database using WP-CLI command:
      wp db export db.sql --allow-root

    b. New server

    1. Connect to the new server via SSH
    2. Navigate to the directory where you want your WordPress site to be in (example: /home/runcloud/webapps/yoursite)
    3. Pull website files from a current server using Rsync:
    rsync -avz --progress --exclude wp-config.php username@currentserver.com:/var/www/vhosts/sitename/public_html/* .
    1. Create an empty WordPress database. RunCloud user can easily create a database via RunCloud dashboard. You can create a database using command lines too:
      mysql -u root -p
      You will enter MySQL shell then use the following commands to create WordPress user and database:
    CREATE USER wordpressuser@localhost IDENTIFIED BY 'passw0rd';
    CREATE DATABASE wordpress;
    GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY 'passw0rd';
    FLUSH PRIVILEGES;
    quit;

    Remember change passw0rd to the secure password, you want to use. These credentials will be used for the wp-config.php file.

    • Generate WordPress configuration file using WP-CLI command: wp core config --dbname=wordpress --dbuser=wordpressuser --dbpass=passw0rd --allow-root
    • Import the WordPress database dumped in the directory using WP-CLI command: wp db import db.sql --allow-root
    • Update WordPress installation ownership and use the recommended permissions for files & directories:
    sudo chown -R runcloud:runcloud /home/runcloud/webapps/yoursite/
    sudo find /home/runcloud/webapps/yoursite/ -type f -exec chmod 644 {} +
    sudo find /home/runcloud/webapps/yoursite/ -type d -exec chmod 755 {} +

    Note:

    • If the SSH is using a non-standard port, you can pass the port parameter to SSH with the -e option: rsync -avz -e 'ssh -p <port-number>' --progress --exclude wp-config.php username@currentserver.com:/var/www/vhosts/sitename/public_html/* .
    • If you are migrating to a new domain. Run database search & replace to update the new domain name in the database: wp search-replace 'https://old-domain.com' 'https://new-domain.com'
    • runcloud:runcloud is a reference that is in place of your system username
    • /home/runcloud/webapps/yoursite where runcloud should be the system username and yoursite should be your web application
    • To fix ownership of system user, use the navigation menu and go into your web application, scroll down to Tools, and click the Fix Ownership button.

    Tips: DNS Propagation

    After website files and database migration, you will need to update the domain name’s DNS records to the new cloud server IP address.

    You can try speeding up the DNS propagation time by lowering the TTL (Time To Live). This will refresh the DNS at a quicker rate. You can try set TTL to as low as 120 (2 minutes). However, some of the networks may still update slowly.

    Wrapping Up

    RunCloud is a powerful and easy-to-use platform that helps you manage your websites on any cloud server. With RunCloud, you don’t need to be a Linux expert to set up, secure, and optimize your web applications. You can do everything from a simple and intuitive dashboard, saving you time and hassle.

    RunCloud supports various web servers, PHP versions, databases, and frameworks. You can also monitor your server performance, back up your data, and automate your tasks with RunCloud. Whether you are a developer, a freelancer, or a business owner, RunCloud can help you run your websites faster and smoother.

    What are you waiting for? Join RunCloud today and enjoy the best web hosting solution for your websites. It’s free for 7 days, no strings attached!

  • How to Change/Reset MySQL Root Password on Ubuntu Linux?

    How to Change/Reset MySQL Root Password on Ubuntu Linux?

    Did you forget the root password for your MySQL Server?

    Or maybe you provisioned your RunCloud server via the auto-install method and never had the need to use your password in the first place?

    Whatever may be the case, if you want to reset your MySQL password then you’ve come to the right place!

    In this guide, we’ll walk you through how to set, change, and recover your MySQL root password on an Ubuntu server via MySQL command line.

    If you have no prior experience managing MySQL, don’t worry – with RunCloud, it is as easy as ABC.

    How to Reset Your MySQL Root Password in Linux

    Step 1: Log in to the Server with SSH

    We have already written in-depth documentation on connecting to your RunCloud account via SSH, but if you’re not using RunCloud, you can use the following SSH command to log in to your server:

    ssh user@server_ip_address

    In the above command, replace the user with the username of your Linux account, and server_ip_address with your server’s IP address.

    Keep in mind that the Linux account must have superuser permissions to execute the commands given in the next step.

    Step 2: STOP MySQL Server

    After logging in to your server, you need to stop the MySQL service. You can use the following command to do this:

    Note: If you have any websites or other services that are using this database, then they will not be able to connect to your database while you carry out this action, so it is best to do this outside of business hours.

    sudo systemctl stop mysql
    logging into root user via command line

    Step 3: Restart MySQL Server

    After stopping the server, you can now restart it in the safe mode. This will allow us to execute SQL commands without needing to enter the password.

    Since the command --skip-grant-tables enables anyone to connect without a password, it is considered highly insecure, which is why all commands that follow must be done within a brief period. The ampersand (&) at the end is required as it ensures that the command is being run parallel with the commands that follow afterwards.

    To start MySQL without permission checking, execute the following command:

    sudo mysqld_safe --skip-grant-tables &
    MySQL root password

    Step 4: Log in to MySQL

    Once your server is up and running, you can log in to MySQL as the root user without the need for any password by executing the following command:

    mysql -u root

    Step 5: Change MySQL Password with Command Line

    Once you’re logged in to the MySQL server, you can do anything you like – such as changing the password for users, granting permissions, deleting database, etc.

    To change the root password, execute the following command:

    ALTER USER 'root'@'localhost' IDENTIFIED BY 'RunCloud_password';
    FLUSH PRIVILEGES;

    In the above command, replace the RunCloud_password with your new password.

    Alternatively, you can also use the following command to change the password:

    SET PASSWORD FOR 'root'@'localhost' = PASSWORD('RunCloud_password');
    FLUSH PRIVILEGES;

    Step 6: Stop & Restart MySQL Server

    Finally, you need to stop the MySQL service and restart it in normal mode. To do this, first exit from the MySQL CLI by using the exit; command, and then restart the service using the following commands:

    sudo systemctl stop mysql
    sudo systemctl start mysql

    That’s it! Once your server is up and running, you can start using it normally. To log in to your server via the new password, use the following command:

    mysql -u root -p

    The above command will prompt you to enter a password. To complete the login process, type your password and press Enter. Keep in mind that the password will not be displayed on screen for security reasons.

    Step 7: Edit RunCloud Configuration File (Only for RunCloud Users)

    If you are using RunCloud to manage your servers, then you will need to edit a config file on your server so that RunCloud agent can access your MySQL database using the new password. To edit the config file, execute the following command on your terminal:

    nano /etc/mysql/conf.d/root.cnf

    The above command will open a text editor in your terminal, you can use the arrow keys on your keyboard to navigate and replace the existing password with your new password.

    After editing the file, you can save it by pressing Ctrl + O and exit the editor by pressing Ctrl + X. If you need step-by-step instructions on editing the file, then you should read our post on editing files over SSH using Nano.

    Frequently Asked Questions

    How do I find my MySQL root password?

    You cannot directly find the MySQL root password due to security reasons. However, you can reset it. To recover the password, you need to stop the MySQL server process, start the MySQL server with the --skip-grant-tables and --skip-networking options, and then connect to the MySQL server as the root user.

    What is the password for the root user in MySQL Workbench?

    The password for the root user in MySQL Workbench is the one you set during the installation of MySQL. If you haven’t set any password, you might be able to log in directly.

    How to change SQL password using CMD?

    You can change the SQL password using the command line by using the ALTER USER statement.

    How to reset MySQL root password in Docker?

    To reset the MySQL root password in Docker, you need to first access your MySQL container using the docker exec command and then, follow the steps described in this post to reset your root password.

    How to reset the root password in MySQL Mac?

    To reset the root password in MySQL on a Mac, you need to stop the MySQL Server first. Then, start the server in safe mode with a privilege bypass. In a new window, connect to the database, set a new password (as explained in this post), and flush the permissions.

    Can a MySQL user change their own password?

    Yes, a MySQL user can change their own password using the SET PASSWORD or ALTER USER statement.

    How to Recover the MySQL Root Password?

    Unfortunately, you cannot retrieve the MySQL root password. However, you can reset it by following the steps mentioned in this post.

    How to find MySQL root password in RunCloud?

    If you install RunCloud via manual installation, then the MySQL root password is displayed on your terminal screen at the end of the RunCloud agent installation on your server.

    Wrapping Up

    RunCloud is a powerful and easy-to-use platform that helps you manage your websites on any cloud server. With RunCloud, you don’t need to be a Linux expert to set up, secure, and optimize your web applications. You can do everything from a simple and intuitive dashboard, saving you time and hassle.

    RunCloud supports various web servers, PHP versions, databases, and frameworks. You can also monitor your server performance, back up your data, and automate your tasks with RunCloud. Whether you are a developer, a freelancer, or a business owner, RunCloud can help you run your websites faster and smoother.

    What are you waiting for? Join RunCloud today and enjoy the best web hosting solution for your websites. It’s free for 7 days, no strings attached!

  • How to Create Wildcard Subdomain for Unlimited Subsites

    How to Create Wildcard Subdomain for Unlimited Subsites

    What is Wildcard subdomain

    Wildcard subdomain is a wildcard (catch-all) DNS record that will match request for non-existent subdomains. It is specified by a “*” as part of the domain name, example: *.yourdomain.com.

    With wildcard subdomain setup, you do not need to create a DNS record for each subdomain. Example: unlimited subdomain for WordPress multisite setup.

    In this tutorial, you will learn how to create a wildcard subdomain with RunCloud.

    Step 1: Create a wildcard subdomain with domain registrar

    In order to create a wildcard subdomain, you need to add a wildcard DNS recoord for your domain name. You will need to access your domain name control panel for DNS management, usually provided by your domain registrar.

    Here I will show you how to create a wildcard subdomain for your RunCloud server. In this example, I am using Cloudflare for DNS management.

    Goto DNS management page and follow the steps below to create a wildcard subdomain DNS record:

    1. Select “A” for record type (you can also use CNAME)
    2. Use “*” for DNS record name
    3. Fill in your RunCloud server IP address for the DNS record value
    4. If you are using Cloudflare, select “grey cloud” to skip going through Cloudflare network.
    5. Click “Add Record” button to add the wildcard subdomain DNS record

    Next, we need to setup the RunCloud server to response to the wildcard subdomain requests.

    Step 2: Create web application for wildcard subdomain with RunCloud

    There are two ways to response to the wildcard suddomain requests:

    1. create web applications to response to each wildcard subdomain request. Example: a.yoursite.com, b.yoursite.com, c.yoursite.com, …
    2. create a web application that answers all wildcard subdomain requests. Example: *.yooursite.com

    Solution 1: Create a web application for each subdomain
    At “Web Application” in RunCloud panel… Click “Create Web App” button to create a new web application.

    Remember to type your desire subdomain name (a.yoursite.com) for “Domain Name”. select PHP version and web application stack then click “add web application” button to create a new web application on your server.

    Any future request to the subdomain will be served by the web application you just created. Do not need to add a new subdomain DNS record at domain management panel.

    Any subdomain request that is not assigned to any web application will be fall back to the default web application (if you have setup one).

    Solution 2: Create a web application to answer all subdomain requests

    If you have a web application like WordPress multisite, that will answer all subdomain requests, then use this approach to setup the web application that for wildcard subdomain.

    Similar to Solution 1 above, create a new web application but at the “Domain Name” field, you enter a wildcard subdomain instead, example: *.yoursite.com

    The web application with wildcard subdomain will answer all subdomain requests that is not assigned to any other web applications.

    Let’s say you have a web application with domain name “client.yoursite.com”, then request for “client.yoursite.com” will not be answered by the web application with wildcard subdomain “*.yoursite.com”.

    Tips: After creating a wildcard subdomain, you would like to make a free SSL certificate (HTTPS) for all the subsites.

    Summary

    In order to create a working wildcard subdomain, you need to setup it at domain registrar (add wildcard DNS record) and RunCloud panel (create web application).

    Once setup wildcard subdomain, you do not need to manually add new subdomain DNS record for your new web application or website.

    All you need to do is create a new web application using RunCloud panel and it will work automatically.

  • How to Create a Subdomain for RunCloud Web Application

    How to Create a Subdomain for RunCloud Web Application

    Subdomain is an easy and free way to categorize your website content and separate them from the main website. In this tutorial, you will learn what is a subdomain, the use cases, and how to host a web application at subdomain using RunCloud.

    What is a Subdomain?

    A subdomain is a domain that is a part of a root domain, separated by a dot (“.”). For example, sub.domain.com is a subdomain of the root domain yourdomain.com .
    Subdomain is used as an easy way to create a memorable website address to organize your website content. For example, gallery.yoursite.com for the photo galleries of your website.
    Uses of subdomain includes:

    • Organizing website content according to category, i.e: support.yoursite.com, download.yoursite.com, shop.yoursite.com
    • Serve sub website for other users, i.e: jeff.yoursite.com, admin.yoursite.com, user1.yoursite.com
    • Make long link easy to remember. For example, shorten the long link https://yoursite.com/special/content/you-cannot-remember-this/123121513/ to a subdomain special.yoursite.com
    • Create a copy of your main website for testing. You can clone your main website into subdomain for testing and development, i.e: beta.yoursite.com
    • Mobile website: m.yoursite.com
    • Location specified website: malaysia.yoursite.com

    Create a subdomain for RunCloud Web Application

    It is easy to use a subdomain for your web application using RunCloud panel.
    Firstly, you will create a web application as usual but at the “Domain Name” field, you enter the subdomain instead of the root domain. Choose the PHP version and server stack, then click “Add Web Application” button to create the web application at subdomain.
    Now you need to add a DNS record for the subdomain to your domain name’s DNS zone.
    In this article, I use CloudFlare DNS for example. If you are not sure how to do it, please refer to your DNS hosting provider (usually also your domain registrar) for support.
    Here are the steps to add a subdomain DNS record for your RunCloud web application:

    1. Get your server IP address. You can view and copy the server IP address at the RunCloud servers overview or server summary page. Simply click on the IP address (numeric string) below server name to copy it. Write down the IP address because we will need it later.
    2. Login your DNS hosting control panel to add a new DNS record into your domain name’s DNS zone.
    3. Add a new “A” type DNS record, with the subdomain name and point to the server IP address. For example, sub is the subdomain and 0.0.0.0 is the server IP address (refer screenshot below)

    Now you can visit sub.yoursite.com and RunCloud will serve your web application at the subdomain as usual.

  • How to Block IP Address Using WordPress .htaccess File to Stop Bad Visitors

    How to Block IP Address Using WordPress .htaccess File to Stop Bad Visitors

    In this tutorial, we show you how to block bad visitors by their IP addresses using only Apache .htaccess file. No WordPress plugin required.

    Your public website is on the internet for anyone, including bad visitors like bad bots, spammers, hackers, malicious users. They are annoying, taking up your web server resources, and potential security risk.
    The good news is that you can “blacklist” them by blocking their IP address. An IP address is a string of 4 numbers separated by a single dot (IPv4) or 8 groups of 4 hexadecimal digits (IPv6). Each device on the internet is identified by an unique IP address.

    At RunCloud, we support 4 different web server stack:

    If you are using NGINX+Apache2 Hybrid web server stack, then you can easily block IP address using the .htaccess file in your WordPress root folder.

    What is .htaccess file

    .htaccess is a configuration file for Apache web server. You can create and edit an .htaccess file using any plain text editor.

    When the Apache server loads a web folder, it detects and execute the .htaccess file. .htaccess file can be used to modify Apache server configuration, enable or disable functionality and features — including blocking visitors by IP address.
    One of the advantages of using .htaccess is that it is executed before website is loaded. It also does not take up system resources like PHP & MySQL.

    Identify bad IP addresses

    We need to identify a bad IP address before we can block it. Here we show two ways to find bad IP addresses that visit your WordPress site.

    1. Find IP address of spammers

    WordPress dashboard comments IP address

    Login your WordPress dashboard then goto Comments. Click on “Spam” to list all the spam comments. The spammer’s IP address is displayed in the “Author” column. Identify the repeating spammers then copy their IP addresses. We will block them later.

    2. Find IP address of brute force attacks or login attempts

    We can find all visitors IP addresses in the web server access log file. It is a bit tricky and takes some experiences to identify a bad visitor.

    Apache access log file path on RunCloud is:

    /home/runcloud/logs/apache/app-name_access.log
    • runcloud is the RunCloud default system user name. Replace it with your own system user name.
    • Replace app-name with your web application name.

    Check the Apache server log file and identify IP addresses that repeatedly visit (flooding) your website pages in a short period (every few seconds).

    RunCLoud Log file

    Who is the IP address?
    Write down the suspicious IP addresses. It is a good idea to check who owns the IP addresses before blocking them. You do not want to mistakenly blocking a genuine visitor like Google bots, right? Simply visit https://who.is/ to check the owner of an IP address.

    Block IP address using WordPress .htaccess file

    Warning: Your website may not be accessible if you mess up the .htaccess file. Please make sure you backup your .htaccess file before edit it.

    Now you have a list of bad IP addresses you want to ban them from visiting your website. You can easily block the IP addresses using .htaccess file.

    Please note that .htaccess file only works if you are using Apache or NGINX+Apache2 Hybrid web server stack.
    A default WordPress .htaccess file will look like the below:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Depends on your site configuration, your .htaccess file may look different. It is fine. Make sure you make a backup copy of the .htaccess file.

    Edit your WordPress .htaccess file using any plain text editor (or RunCloud web based file editor) and add the following lines to the top of the file:

            Order Allow,Deny
            Allow from All
            # add new line to block eacg IP address
            # 192.168.8.1

    Add each IP address that you want to block as a new line below the above lines. Save the .htaccess file and any visitors with the IP addresses are unable to access your site.

    Tip: You can temporary unblock an IP address by comment it — add a “#” at the beginning of the line.

    Bonus: 6G Firewall

    Now that you know how to block an IP address using WordPress .htaccess file. It is a small step to fight malicious visitors.

    Blocking visitor by IP address is a temporary solution because IP addresses change constantly. It is best for quickly blocking certain visitors.

    Check out the 6G Firewall by Jeff Starr, if you are looking for more complete WordPress security protection using only .htaccess file. It is free and open source.

    Fine-tuned to minimize false positives, the 6G Firewall protects your site against a wide variety of malicious URI requests, bad bots, spam referrers, and other attacks.

    Hope this article is helpful to you fighting annoying malicious visitors to your WordPress site. Please share with us about how do you ban bad website visitors in the comment.

    Wrapping Up

    RunCloud is a powerful and easy-to-use platform that helps you manage your websites on any cloud server. With RunCloud, you don’t need to be a Linux expert to set up, secure, and optimize your web applications. You can do everything from a simple and intuitive dashboard, saving you time and hassle.

    RunCloud supports various web servers, PHP versions, databases, and frameworks. You can also monitor your server performance, back up your data, and automate your tasks with RunCloud. Whether you are a developer, a freelancer, or a business owner, RunCloud can help you run your websites faster and smoother.

    What are you waiting for? Join RunCloud today and enjoy the best web hosting solution for your websites. It’s free for 7 days, no strings attached!

  • ​How to Use SFTP with FileZilla to Securely Transfer Files on RunCloud

    ​How to Use SFTP with FileZilla to Securely Transfer Files on RunCloud

    In this tutorial, you will learn how to use SFTP with FileZilla to securely transfer and manage files on RunCloud server.

    FTP is not secure

    FTP (File Transfer Protocol) uses clear text for all transmissions. Anyone is able to read the FTP usernames, passwords, commands and data by packet capture (sniffing) on the network. By default, RunCloud Firewall blocks FTP (port 21) at your server. You are recommended to use SFTP for file transfer instead.

    Tip: You can use RunCloud File Manager in RunCloud panel for simple file management.

    What is SFTP?

    SSH or Secure File Transfer Protocol (SFTP) is a secure file transfer protocol for file access, transfer, and management. It adapts the Secure Shell (SSH) protocol with encryption and secure authentication on both server and client.

    SFTP provides two user-authentication options when connecting to your server: a)passwords or b)SSH2 key-based authentication. The SSH Keys is more secure than password.

    What is FileZilla?

    FileZilla is a free, open source FTP client that supports FTP, SFTP, FTPS. It is available for Windows, Mac OS X, and Linux. Download FileZilla Client.

    SFTP via Passwords

    Filezilla SFTP via Password
    1. Open FileZilla client
    2. Open Site Manger by clicking the top left icon in menu bar, or press Ctrl+S
    3. Click New Site button and gives a name to the new site connection
    4. At the right side panel enter the following information:
      • Host: [RunCloud server IP address]
      • Port: 22
      • Protocol: SFTP – SSH File Transfer Protocol
      • Logon Type: Normal
      • User: [System User’s username]
      • Password: [System User’s password]
    5. Click Connect button to connect (OK button to save the connection)
    6. Accept fingerprint warning when prompt
    7. You are now connected to RunCloud server via SFTP using password

    SFTP via SSH2 Key-based Authentication

    If you have not yet create an SSH key pair, then follow one of the two tutorial below:

    Method #1

    FileZilla SFTP via SSH key
    1. Open FileZilla client
    2. Open Site Manger by clicking the top left icon in menu bar, or press Ctrl+S
    3. Click New Site button and gives a name to the new site connection
    4. At the right side panel enter the following information:
      • Host: [RunCloud server IP address]
      • Port: 22
      • Protocol: SFTP – SSH File Transfer Protocol
      • Logon Type: Key file
      • User: [System User’s username]
      • Key file: [select your SSH private key in .ppk or .pem format]
    5. Click Connect button to connect (OK button to save the connection)
    6. You are now connected to RunCloud server via SFTP using SSH key

    Method #2

    Add SSH key into FileZilla
    1. Open FileZilla client
    2. In the Edit – Preferences menu, select SFTP under Connection
    3. Click Add key file… button to add your SSH private key (If your key is in OpenSSH format, FileZilla will prompt you to convert it to PuTTY’s PPK format)
    4. Click OK button to save setting and exit Preferences window
    5. Follow Method #1 above but select Interactive for Logon Type

    Wrapping Up

    RunCloud is a powerful and easy-to-use platform that helps you manage your websites on any cloud server. With RunCloud, you don’t need to be a Linux expert to set up, secure, and optimize your web applications. You can do everything from a simple and intuitive dashboard, saving you time and hassle.

    RunCloud supports various web servers, PHP versions, databases, and frameworks. You can also monitor your server performance, back up your data, and automate your tasks with RunCloud. Whether you are a developer, a freelancer, or a business owner, RunCloud can help you run your websites faster and smoother.

    What are you waiting for? Join RunCloud today and enjoy the best web hosting solution for your websites. It’s free for 7 days, no strings attached!

  • How To Use SSH Keys with PuTTY on RunCloud

    How To Use SSH Keys with PuTTY on RunCloud

    SSH keys are more secure than passwords and can help you log in without having to remember long passwords.

    With RunCloud you can easily add your ssh key to your server. If you are running an *NIX type OS such as MacOS or any Linux distro, ssh is already included with your OS. You can easily open a Terminal window execute ssh commands to connect to remote hosts.

    For Windows users, This has traditionally been a bit of a challange. It has required the installation of 3rd party software called PuTTY. This software creates SSH sessions from your local OS to the server.

    It must be mentioned that this situation has changed recently. Since the Windows 10 Creators Update in 2017, Windows 10 users can enable the Linux Bash Shell for Windows and use a beta OpenSSH client to directly connect with remote servers via SSH. We will show you how to use the Windows 10 Linux Bash Subsystem for SSH in a future tutorial. Having said this, it is a beta client so there may still be some bugs whereas PuTTY is a truly tried and battle tested solution.

    In this tutorial, I’ll guide you how to connect to your Runcloud managed server with PuTTY.

    1.Download and Install

    To get started you just need to install PuTTY to your computer. Here is the download link

    2.Create an SSH Key Pair

    Now you need to create an SSH key Pair. Open the PuTTYgen program through your Start Menu or by tapping the Windows key and typing “PuTTYgen”. It will look something like this:

    Just click on generate button then the process will start:

    In case you didn’t read the program’s instructions, MOVE YOUR MOUSE OVER THE BLANK AREA RANDOMLY so the program will generate an ssh key. After the key is generated the program will show you something like this:

    Remember to save the public key and the private key to any folder that you wanted. Let me explain a bit about these two keys.

    The Private key is used to determine and verify the user’s identity, therefore the key cannot be passed to anyone else. If another person obtains this key, they will be able to falsely access any account that you link with this private key and issue bogus commands.

    The Public key is the key that is associated with your private key that you will install on other machines and accounts, this will enable access to them without a password. This key can be share freely.

    Now that you have generated the keys that you need, we’ll continue to the next step.

    3.Upload Your Public Key to Runcloud.

    To upload your public key to runcloud, first you need to open the ssh key menu on the runcloud panel on the server that you wish to connect to:

    Then you need to create SSH key, It will look like this:

    Make sure the user selected is also the Web Appilcation owner. In this tutorial, I’ll be using root (ROOT CAN’T HAVE ANY WEB APPLICATION. PLEASE DON’T USE ROOT USER TO UPLOAD, CREATE OR EDIT YOUR WEB APPLICATION FILES). After you finish your public key will be displayed on the panel screen:

    4.Setting Up an SSH Session with SSH Keys in PuTTY

    Now you have your uploaded your public key into your server, the last step is to setting up the connection.

    Start up the PuTTY program through your Start Menu or by tapping the Windows key and typing “PuTTY”.

    Inside the program you will see the session screen:

    Just insert your server ip address. The port is 22 this is standard port for ssh.
    You need to set your data and SSH auth. On the data screen I have added root to the auto-login username, but assuming you followed my advice above, you should be using the Web Application owner so use that username instead:

    Then select your saved private key in the SSH auth screen:

    Now all configurations are done, you just need to revisit the session screen and click the OPEN button. You will get a prompt to click yes, once clicked you are now connected: