Blog

  • RunCloud Supports Ubuntu 20.04 LTS (Focal Fossa)

    RunCloud Supports Ubuntu 20.04 LTS (Focal Fossa)

    We are happy to officially support Ubuntu 20.04 LTS (Focal Fossa) in RunCloud.

    You are able to connect Ubuntu 20.04 LTS to RunCloud through IP Address installation.

    What is Ubuntu LTS

    Ubuntu LTS (Long Term Support) versions are released every 2 years and are guaranteed to receive support for at least 5 years after release.

    LTS releases are the ‘enterprise grade’ releases of Ubuntu and are utilised the most. An estimated 95% of all Ubuntu installations are LTS releases.

    ubuntu 20.04

    The previous LTS version, Ubuntu 18.04 LTS, will stop receiving updates after April 2023. Ubuntu 18.04 LTS will receive security fixes and critical updates until April 2028.

    Ubuntu 20.04 LTS, codenamed Focal Fossa, is the latest Long Term Support release and was released on 23 April 2020, and will get maintenance updates for 5 years, until April of 2025.

    What’s New In Ubuntu 20.04 LTS For RunCloud?

    Generally, an Ubuntu LTS contains only a few major changes for a server.

    You can refer to the Ubuntu 20.04 LTS release notes for new features.

    Linux Kernel 5.4

    Ubuntu 20.04 TLS is based on the long-term supported Linux kernel 5.4.

    Notable features and enhancements in linux kernel 5.4 are:

    • Since kernel 5.3, it supports new hardware including Intel Comet Lake CPUs and initial Tiger Lake platforms, AMD Navi 12 and 14 GPUs, Arcturus and Renoir APUs along with Navi 12 + Arcturus power features.
    • Since kernel 4.15, it supports AMD Rome CPUs, Radeon RX Vega M and Navi GPUs, Intel Cannon Lake platforms.
    • Boot speed improvements through changing the default kernel compression algorithm to lz4 (in Ubuntu 19.10) on most architectures, and changing the default initramfs compression algorithm to lz4 on all architectures.

    Supported PHP Versions

    Ubuntu 20.04 LTS on the RunCloud servers only supports PHP 7.2, 7.3, and 7.4 when this article is published.

    If you still want to use PHP 7.0 or 7.1, please use Ubuntu 16.04 LTS (Bionic Beaver).

    Ubuntu 16.04 vs 18.04 vs 20.04 Comparison

    Starting from today, RunCloud officially supports Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, and Ubuntu 20.04 LTS.

    You can find a comparison between these OS in the RunCloud servers.

    OSUbuntu 16.04 LTSUbuntu 18.04 LTSUbuntu 20.04 LTS
    Code NameXenial XerusBionic BeaverFocal Fossa
    Released Date2016-04-212018-04-262020-04-23
    Available PHP Version7.4
    7.3
    7.2
    7.1
    7.0
    5.6
    5.5
    7.4
    7.3
    7.2
    7.1
    7.0
    7.4
    7.3
    7.2
    Initial Kernel Version4.44.155.4
    Standard support until2021-042023-042025-04
    Extended Security Maintenance Until2024-042028-042030-04

    Upgrade From Ubuntu 16.04/18.04 to 20.04???

    Do you need to upgrade from Ubuntu 16.04/18.04 LTS to Ubuntu 20.04?

    Short answer, NO!

    We do not recommend upgrading Ubuntu to a new major release at all.

    Upgrading to a major release could break all of your website on that server, it will also remove RunCloud agent, and it makes your server no longer connected to RunCloud anymore.

    If you have a RunCloud server with Ubuntu 16.04 or 18.04, please stay with this OS version, do not upgrade it to Ubuntu 20.04.

    RunCloud provides your Ubuntu 16.04 or 18.04 servers with the latest Ubuntu security updates, and takes care of this automatically for you, so you do not have to worry about anything.

    If you want to try to use Ubuntu 20.04 LTS for your current web application, please connect a fresh Ubuntu 20.04 server to RunCloud and use our Clone Web App feature to clone your web app to your new Ubuntu 20.04 server.

    Connect Ubuntu 20.04 Server To RunCloud

    RunCloud provides three different methods to connect your server to RunCloud.

    • Direct Server Provisioning using server provider API
    • Direct Server Installation via IP Address and root password
    • Manual Server Installation via IP Address

    For Ubuntu 20.04, currently, we support Direct Server Installation and Manual Server Installation via IP Address installation.

    Direct Server Provisioning for each supported Server Provider will be available soon.

    Direct Server Installation via IP Address and root password

    Using the direct server installation method, you only need to create a server with fresh Ubuntu 20.04 install, input your server IP address and root password, then sit back and relax, our direct server installation will setup your server in minutes.

    Manual Server Installation via IP Address

    Using the manual server installation method, you only need to create a server with fresh Ubuntu 20.04 install, login to your server console as root user, run RunCloud installation script, then sit back and relax, our manual server installation will setup your server in minutes.

    Summary

    At RunCloud, we are all about making your dev life easier, delivering a fast service, and ensuring your server is managed properly.

    With Ubuntu 20.04 LTS support, you are able to connect Ubuntu 20.04 LTS to RunCloud through IP Address installation.

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

    This feature has been a requested feature 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.

  • How To Use ModSecurity and OWASP CRS For Web App Firewall (WAF) To Secure Your Website

    How To Use ModSecurity and OWASP CRS For Web App Firewall (WAF) To Secure Your Website

    With security as a primary focus this year, we are happy to bring ModSecurity and OWASP CRS for your Web Application Firewall (WAF) in RunCloud.

    This feature helps protect your website from many types of attacks against your web application.

    You can easily enable or disable ModSecurity WAF to each web application in your RunCloud servers and adjust Paranoia Level and Anomaly Threshold parameters.

    Our ModSecurity WAF comes with OWASP ModSecurity Core Rule Set (CRS) and allows you to add Rule Modification easily from the RunCloud dashboard.

    What is ModSecurity

    ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx that is developed by Trustwave’s SpiderLabs.

    WAF can be enabled in your website to provide an external security layer that increases security, detects, and prevents attacks before they reach web applications, because over 70% of all attacks are now carried out over the web application level.

    It can help detect and prevent many attacks against your web application by checking all HTTP(s) requests you are willing to allow or block (e.g., request methods, request headers, content types, etc.) against its set of rules.

    If the check fails, the visitor will not see the content of your website, predefined actions are performed, usually the visitor will get 403 Forbidden screen.

    What is OWASP CRS

    ModSecurity only is not enough to protect your website. You need to configure an additional rule set to make web protection work.

    The OWASP ModSecurity Core Rule Set (CRS) is a set of generic attack detection rules for use with ModSecurity or compatible web application firewalls.

    The CRS aims to protect web applications from a wide range of attacks, with a minimum of false alerts, including:

    • SQL Injection (SQLi)
    • Cross Site Scripting (XSS)
    • Local File Inclusion (LFI)
    • Remote File Inclusion (RFI)
    • PHP Code Injection
    • Java Code Injection
    • HTTPoxy
    • Shellshock
    • Unix/Windows Shell Injection
    • Session Fixation
    • Scripting/Scanner/Bot Detection
    • Metadata/Error Leakages

    How To Install ModSecurity and OWASP CRS

    If you are very familiar with Linux and want to do it by yourself, you can check Netnea Apache / Modsecurity Tutorial to install ModSecurity & OWASP in your Apache server. Please do so at your own risk, because there will be no support when you have issues on this manual setup.

    In RunCloud, we want to make it very easy for everyone, from beginner to expert, to enable or disable ModSecurity and OWASP CRS in each of your web applications on your servers easily, instead of having to log into the linux terminal to do it.

    Please login to your RunCloud Dashboard, choose your server, go to Web Applications menu and click one of your web applications, and you will see the Firewall menu.

    Click “Enable” to to enable Web Application Firewall (WAF) to your current web application, and click “Save Changes”.

    That’s all. It is very easy!

    You can customize WAF Settings by configuring paranoia level, anomaly threshold, and common rule exclusion.

    Paranoia Level

    Using paranoia level, you can choose the desired level of rule check to protect your web application.

    Higher paranoia levels will strengthen web security, but will also increase the possibility of blocking some legitimate traffic due to false alarms (also named false positives or FPs).

    From OWASP CRS website, there is a detailed explanation about the difference of paranoia levels.

    A paranoia level of 1 (PL1) is default. At this level, most core rules are enabled. PL1 is advised for beginners, installations covering many different sites and applications, and for setups with standard security requirements.

    Paranoia level 2 (PL2) includes many extra rules, for instance, enabling many regexp-based SQL and XSS injection protections, and adding extra keywords checked for code injections.

    PL2 is advised for moderate to experienced users who desire more complete coverage, and for all installations with elevated security requirements.

    Paranoia level 3 (PL3) enables more rules and keyword lists that cover less common attacks. PL3 also tweaks limits on all special characters used, which provides high coverage against unknown attack types, obfuscated attacks, and attempted WAF bypasses.

    PL3 is aimed at users who are experienced at the handling of FPs and at installations with high security requirements.

    Paranoia level 4 (PL4) further restricts special characters.

    PL4 is advised for experienced users protecting installations with very high security requirements.

    Recommended level for most use cases is 1 (default) or 2.

    Anomaly Threshold

    ModSecurity assigns a score for each security risk found in a request (Critical: 5, Error: 4, Warning: 3, Notice: 2).

    Anomaly threshold determines the accumulated score for a request to be blocked.

    Recommended level for production website is 5-10.

    Common Rule Exclusion

    OWASP CRS provides common rule exclusions for some popular Content Management System (CMS), including WordPress, Drupal, NextCloud, DocuWiki, and Xenforo.

    If your current web application uses any of those CMS, please tick in the checkbox to reduce false positives and it will be automatically applied to your firewall.

    Bonus: Custom Firewall Rule Modification

    We also bring firewall rule modification to allow you to have more control on allow or block some traffic, or disable any ModSecurity rule ID.

    Note: This special custom firewall rule modification feature is available only for Business plan users.

    Using this feature, you can control incoming traffic by filtering requests based on Cookie, Country, Hostname, IP Address, URI and more.

    First example, you can use custom firewall rules to block traffic from any country.

    Second example, you can use a custom firewall rule to disable a rule when you see any legitimate traffic get blocked in your server (false positive). You can get CRS Rule ID from Nginx Error Log or ModSec Audit Log.

    You can create multiple custom firewall rule and enable/disable it by toggling ON/OFF button, without having to delete this rule.

    How To Test ModSecurity In Your Website?

    After enabling Web Application Firewall (WAF) in your website, you probably want to know if this firewall works for your website or not.

    You can try to visit this link on your website.

    http://yourawesomedomain/?abc=../../

    Visit this page twice, and you will see 403 Forbidden screen page.

    It means that this visit is blocked by ModSecurity successfully.

    If you use a higher paranoia level and get a lot of 403 Forbidden screen, please change Paranoia Level to 1.

    Nginx Error Log and ModSec Audit Log

    ModSecurity will log any blocked traffic in your website.

    You can check it on Nginx Error Log and ModSec Audit Log in your server.

    In RunCloud, you do not need to login to your server via terminal to check these logs.

    You can simply go to the Web Server Log menu under your Web Application in RunCloud dashboard.

    All blocked traffics will get listed on Nginx Error Log.

    You can check ModSec Audit Log to see the details

    Developer Tips: Custom Nginx Config

    If you are an experienced developer and want to see the custom Nginx config that is applied on your web application when enabling Web Application Firewall, you can go to Nginx Config menu under your web application in RunCloud.

    RunCloud adds two custom Nginx config for Web Application Firewall.

    You can click it to see the configs, but you cannot edit or delete it. It will be automatically deleted when you disable WAF for this web application.

    Summary

    At RunCloud, we are all about making your dev life easier, delivering a fast service, and ensuring your server is managed properly.

    Whether beginner or expert developer, we’ve made enabling or disabling Web Application Firewall (WAF) using ModSecurity and OWASP CRS easy for you.

    ModSecurity and OWASP CRS helps protect your website from many types of attacks against your web application.

    This feature is available to all paid plans (Basic, Pro, Business) for a limited time, and only available for Business plan after.

    This feature has been a requested feature that we knew would be useful to you. Never hesitate to suggest new features that you want to see, and we will make it happen.

  • How To Use NGINX FastCGI Cache (RunCache) To Speed Up Your WordPress Performance

    How To Use NGINX FastCGI Cache (RunCache) To Speed Up Your WordPress Performance

    It is no secret that NGINX FastCGI Cache can drastically increase your WordPress performance by improving server response time and reducing the load on PHP-FPM and MySQL/MariaDB server.

    NGINX FastCGI Cache is usually an advanced topic for developer experts or sysadmins who are familiar with linux commands and the NGINX config.

    In this post, we will enlighten everyone from beginner to expert for this topic, and make NGINX FastCGI Cache (RunCache) as one of your top favourite features in RunCloud.

    What is NGINX FastCGI Cache

    Before we talk about NGINX FastCGI Cache, let’s talk about how your website works.

    1. When a user visits your WordPress page, the web browser sends an HTTP/HTTPS request to NGINX.
    2. NGINX passes the request to PHP-FPM and NGINX will catch any PHP codes when trying to grabbing the page.
    3. PHP-FPM processes the page and runs through the MariaDB/MySQL database query to retrieve the page.
    4. PHP-FPM sends the generated “static” HTML page back to NGINX.
    5. NGINX send the generated HTML page to the web browser for the user.

    When using NGINX FastCGI, this built-in NGINX module will be in between NGINX and PHP-FPM and it is able to generate a cached HTML page from PHP-FPM.

    When another user visits the same WordPress page, your website will not perform the same PHP and database requests again because the page is already cached and served by FastCGI.

    As a result, your server response time will be much faster after the initial load.

    Your PHP-FPM and MariaDB/MySQL load will be reduced.

    Your server CPU resource usage will be lower.

    And finally, your server can handle more traffic with the same server specifications when using NGINX FastCGI Cache, ultimately allowing you to keep a more affordable server without having to scale any further.

    NGINX FastCGI Cache vs Varnish Cache

    When talking about server-side caching mechanism, Varnish is also one of the top popular choices.

    Unfortunately, Varnish is designed to accelerate HTTP and doesn’t support the HTTPS protocol.

    After Let’s Encrypt provides a free SSL/TLS for everyone and Google encourages HTTPS Everywhere and made the move to boost search engine rankings for sites using HTTPS URLS, most websites use HTTPS now for their website to ensure safety from online threats.

    There is a workaround to use Varnish with HTTPS, by adding an SSL/TLS terminator in front of Varnish to convert HTTPS to HTTP.

    NGINX FastCGI does support HTTPS protocol, which is an excellent alternative to Varnish, without having to increase any complexity in the server.

    NGINX FastCGI Cache (RunCache) vs WordPress Cache Plugins

    Many WordPress users ask the same question, which one is better?

    Actually, both are good for your WordPress website.

    When using regular shared hosting, NGINX FastCGI is not available and the only option available is the WordPress cache plugin.

    You will need a VPS / Dedicated server to allow you to optimize your WordPress site using NGINX FastCGI Cache.

    With proper setup, NGINX FastCGI Cache can perform better than any WordPress cache plugin.

    Who Need NGINX FastCGI Cache (RunCache) For WordPress

    All WordPress pages can gain huge benefits when using NGINX FastCGI Cache (RunCache).

    For blogs, magazines, news, company profile websites, and all types of “static” WordPress sites, all WordPress pages can be fully cached and served faster, excluding WordPress admin pages, which are not cached for obvious for reasons.

    For e-commerce, membership, forum, and all types of “dynamic” WordPress sites, most WordPress pages can be fully cached and served faster, except some pages those should stay dynamic.

    For example, in the case of WooCommerce, the homepage, shop page, and single product page can be fully cached, but cart, checkout, and my account pages should be excluded. For these dynamic pages, you can use Redis Object Cache to reduce your MySQL database load and make your dynamic pages load faster, but you do not want to cache these pages fully as the latest changes will not be seen

    How To Install NGINX FastCGI Cache (RunCache) Using RunCloud Hub

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

    If you want to use NGINX FastCGI Cache (RunCache) to speed up your WordPress website, 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, NGINX FastCGI Cache (RunCache) is automatically installed and enabled in your WordPress website, no complex process required.

    How To Check If NGINX FastCGI Cache (RunCache) Works

    When using any cache WordPress plugin, usually you can check if your WordPress page has been cached by checking the footprint at the end of your web page source code.

    NGINX FastCGI Cache (RunCache) works on the server-side, which means there is no footprint on your web page,  you need to check the headers of your website to see these possible values of x-runcloud-cache.

    • HIT : Page is cached and served from the cache.
    • MISS : Page is served dynamically from the server, not from the cache. The response might then have been cached. Refreshing this page again should change the header from MISS to HIT or BYPASS.
    • BYPASS : Page is served dynamically from the server, not from the cache. It is excluded from cache, for example WordPress dashboard admin pages or WooCommerce cart/checkout pages.
    • STALE : Page is served from the cache in cache directory.
    • EXPIRED : Cache is expired. Page is served dynamically from server.

    There are many ways to check the headers of your website, for example:

    Check HTTP Headers With KeyCDN Performance Test

    KeyCDN Performance Test is a free online web performance test to test your website from 10+ test location, from United States to Asia areas.

    You can use this tools to evaluate TTFB (Time to first byte) of your website from many locations.

    Using this tool, you can also check the response header to see if this web page is served by NGINX FastCGI Cache (RunCache).

    Check HTTP Headers With Google Chrome

    You can also view the response HTTP headers in Google Chrome by following these steps:

    1. In Chrome, visit your web page, and open Web Developer Tools by pressing F12 or right click and select Inspect.
    2. When opened, click and select the “Network” tab.
    3. Refresh the page to get fresh page data.
    4. Select the top HTTP request on the left panel and observe HTTP headers on the right panel.

    Check HTTP Headers With cURL

    If you are familiar with linux command, you can use cURL to check HTTP headers quickly.

    curl -I http://yourdomain

    Performance Benchmark : Handling More Traffics

    By eliminating PHP-FPM and MariaDB/MySQL when serving your WordPress page from NGINX FastCGI Cache, the huge benefit is your server can handle more traffics with the same server specifications.

    For this test, we use DigitalOcean 1GB RAM ($5) and default WordPress installation using Twenty Nineteen WordPress Theme.

    We use two different tools:

    • Loader.io – load testing
    • New Relic Infrastucture – CPU usage monitoring

    First Test – 25 users per second in 1 minute

    Without NGINX FastCGI Cache (RunCache), average response time is 201 ms.

    With NGINX FastCGI Cache (RunCache), average response time is only 9 ms. It is big improvement!

    Without NGINX FastCGI Cache (RunCache), the CPU usage jump to 50%.

    With NGINX FastCGI Cache (RunCache), the CPU usage is very low.

    Second Test – from 0 to 100 users in 1 minute

    For this test we use Loader.io to send from 0 concurrent user and increasing to 100 concurrent users within 1 minute.

    Without NGINX FastCGI Cache (RunCache), average response time is 1071 ms. You can see that as concurrent users increase, the response time increase also.  Your website will be slow when you have more visitors.

    With NGINX FastCGI Cache (RunCache), the average response time is still low, 14 ms, increasing visitors from 0 to 100 users doesn’t affect too much on the response time.

    Exploring RunCache Features

    Using RunCloud Hub WordPress plugin, you will have more controls on how NGINX FastCGI Cache (RunCache) works in your WordPress website.

    RunCache Purger

    Purger settings allow you to have more control when the cache is cleared, for example:

    • Automatically clean cache of homepage when post is edited or has a new post.
    • Automatically clean cache of homepage when post removed.
    • Automatically clean cache of post/page/CPT when published.
    • Automatically clean cache of post/page/CPT when comment approved and published.
    • Automatically clean cache of post/page/CPT when comment removed.

    RunCache Rules / Exclusion

    Rules settings allow you to control Cache Exclusion.

    Exclude URL Path option allows you to exclude cache based on matching URL Path. This is very useful when you have dynamic pages that should not be cached in your website.

    For example, in WooCommerce, you have the Cart, Checkout, and My Account page that must never be cached. For WooCommerce users, no action needed, these pages have been added by default.

    Exclude Cookie option allows you to exclude cache based on matching Cookie name.

    Exclude Browser option allows you to exclude cache based on matching Browser User-Agent.

    Exclude Visitor IP option allows you to exclude cache based on matching Visitor IP Address.

    RunCache also has dedicated settings for query strings, because query strings will not cache by default.

    Allow Cache Query String option make it possible for you to allow cache based on matching query string, for example UTM parameters (utm_source, utm_medium, utm_campaign), fbclid, gclid, etc.

    Exclude Cache Query String option allows you to exclude cache based on matching Query string.

    RunCache Preload

    Preload settings allow you to generate caches of your pages without having to wait for a user to visit your pages. Normally, cache is generated after a user visits a page.

    You have the options to:

    • Preload caches automatically when any purge action was triggered.
    • Preload caches automatically based on schedule time (day/week/month).
    • Preload caches manually by clicking “Run Cache Preload” link.

    If you have big number of posts / pages / products in your WordPress sites, cache preload process somestimes can consume your server CPU resources. It is better to run cache preload manually for this case.

    Is It Compatible With Popular WordPress Cache / Optimization Plugins?

    Short answer, YES!

    The important thing to understand, NGINX FastCGI Cache (RunCache) works on the server level and popular WordPress cache / optimization plugins work on the WordPress/application level.

    They are in different spaces and it should be compatible.

    When you use both page caching feature from RunCache and your favourite cache plugin, it is possible if NGINX FastCGI Cache (RunCache) stores the caches from generated caches of the cache plugin, it doubles the page cache.

    You can choose to disable the page cache feature from your WordPress cache / optimization plugins if you find any issue with RunCache.

    For page cache use cases, RunCache should be faster because once your website page cache is available, it will be served to your visitor directly from your server without WordPress.

    If you do not want to use any cache plugin and fully use RunCache, you can still use any optimization plugin, for example Autoptimize, to minify HTML, CSS, and Javascript files in your website.

    Summary

    In RunCloud, we provide you with full control over your server. That is why we do not apply any server-side caching mechanisms automatically to your server.

    If you want to apply server-side caching to one of your web applications within your server, then RunCache (RunCloud Hub) is your answer.

    RunCache allow you to utilize NGINX FastCGI Cache to speed up your WordPress performance without having to deal with linux command to setup NGINX FastCGI Cache.

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

    It has been a largely requested feature that we knew would be useful to you and we are very excited to bring this feature to RunCloud. Never ever hesitate to suggest new features that you want to see, and we will make it happen.

  • How To Install ImageMagick PHP Extension (Imagick)

    How To Install ImageMagick PHP Extension (Imagick)

    Do you want to manipulate images in various ways without using complex tools or libraries? If you answered yes, then you need to know about ImageMagick, a powerful and versatile image processing software that works seamlessly with PHP web applications.

    Even if you are using a CMS or a framework such as WordPress or Laravel for building your website, you may need to install the ImageMagick PHP extension for advanced image processing.

    In this post, we will show you how to install ImageMagick PHP Extension (Imagick) for your PHP web application on RunCloud, the best web application management platform for developers and agencies.

    Note: If you are using RunCloud Docker, you can install ImageMagick and many other PHP extensions for your Docker containers with a few simple steps. Follow our dedicated tutorial to learn how to install ImageMagick PHP extension on RunCloud Docker.

    What is ImageMagick

    ImageMagick is a free and open-source software that was created in 1987 by John Cristy to create, edit, compose, or convert bitmap images.

    It can read and write over 200 image formats, including PNG, JPEG, GIF, HEIC, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG.

    You can use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

    ImageMagick vs GD Library

    ImageMagick is not the only image optimization library in PHP application.

    GD is another library that is also very popular and it is automatically available in RunCloud server.

    Both ImageMagick and GD Library can be used for:

    • Resize / crop images
    • Apply filters to image, for example color, contrast, brightness, etc.
    • Adding content to image, for example text, shape, other image (watermark), etc.
    • Compress images
    • Convert images to different file types

    The key differences between ImageMagick and GD library are:

    • ImageMagick supports over 100 major image formats
    • ImageMagick usually produces better quality images, although sometimes better quality image will also increase the image file size
    • GD is widely available and usually enabled by default, but you have install and enable ImageMagick

    How to Install ImageMagick PHP Extension

    On WordPress, you might want to use the ImageMagick Engine WordPress Plugin for processing resizing and cropping images in WordPress dashboard.

    When ImageMagick is not installed on the server, you will see “ImageMagick PHP module not found” warning on the plugin Settings page.

    runcloud-imagemagick-01-imagick-php-module-not-found2

    Disclaimer: This tutorial is intended for Ubuntu and Debian based distributions only. If you are using Fedora, RHEL, Windows, or Mac, please refer to the official ImageMagick website for installation instructions.

    The first step to install ImageMagick is to check the PHP version of your web application. This is because the installation process varies depending on the PHP version. However, once you have installed ImageMagick for a certain PHP version, it will work for all web applications that use the same PHP version on your server.

    You can find the PHP version of your web application in your RunCloud dashboard.

    Imagick PHP Module for PHP version X.X

    1. To install ImageMagick PHP extension for any PHP version on your server, you need to log in to your server as a root user using Terminal (Mac OSX / Linux) or Powershell / Putty (Windows).
    ssh root@<youripaddress>
    1. Next, you need to run this command, replacing <version> with the specific PHP 8.x version that you want to install ImageMagick for. For example, if you want to install ImageMagick for PHP 8.1, you would replace <version> with 81.
    apt-get install php<version>rc-pecl-imagick
    1. After the installation is complete, you need to reload the PHP-FPM service on your server by running this command, again replacing <version> with the specific PHP 8.x version that you installed ImageMagick for.
    systemctl reload php<version>rc-fpm
    1. To verify that ImageMagick is installed and activated, you can run this command, which will display the ImageMagick version and configuration:
    /RunCloud/Packages/php<version>rc/bin/php -i | grep imagemagick

    For example, if your website uses PHP 8.0, your commands should look something like.

    # install imagick module
    apt-get install php80rc-pecl-imagick
    
    # reload PHP-FPM
    systemctl reload php80rc-fpm
    
    # check / verify if imagick is installed
    /RunCloud/Packages/php80rc/bin/php -i | grep imagemagick

    Similarly, for website using PHP 7.4, the commands should look like.

    # install imagick module
    apt-get install php74rc-pecl-imagick
    
    # reload PHP-FPM
    systemctl reload php74rc-fpm
    
    # check / verify if imagick is installed
    /RunCloud/Packages/php74rc/bin/php -i | grep imagemagick

    If ImageMagick has been installed correctly, you will get an output similar to the following image.

    imagemagick succesfully installed

    After installing ImageMagick correctly, you can see the warning disappear in ImageMagick Engine WordPress Plugin.

    Optional: Adding PDF Support To ImageMagick

    If you want to allow ImageMagick to process PDF files, you will have to login as root user again to your server and edit policy.xml.

    For example, you can use nano to edit this file by running this command.

    nano /etc/ImageMagick-6/policy.xml

    Then please scroll down and locate this line.

      <policy domain="coder" rights="none" pattern="PDF" />

    You need to disable it by commenting out that line. For example, you can replace that line by following line.

      <!-- <policy domain="coder" rights="none" pattern="PDF" /> -->

    Please save the file and exit the editor.

    Then reload the PHP-FPM again, for example for PHP 8.1 you can run this command again.

    systemctl reload php81rc-fpm

    NOTE: Please be careful when you enable PDF support for Imagick. Make sure you always use it with trusted PDF files.

    How Does WordPress Use the Imagick PHP Extension?

    WordPress supports both ImageMagic and GD Library for PHP image processing extensions to resize and crop images in your website.

    By default, WordPress will try to use ImageMagick. If it is not available or it doesn’t support the requested mime-type, WordPress will use the GD extension.

    If you need more control of the quality of re-sized images, you can use ImageMagick Engine WordPress Plugin.

    Image Watermark WordPress plugin is another cool plugin that allows you to watermark each image that you upload to your WordPress site using Imagick.

    If you enable PDF support for the Imagick PHP extension, you will get one extra bonus, WordPress will automatically generate an image for each PDF you upload to your WordPress site!

    How Does Laravel uses ImageMagick PHP Extension?

    If you use Laravel for your website, there are some libraries that you can use for image processing. Let’s take a look:

    1. Intervention Image is an open-source PHP image handling and manipulation library. It provides an easier and more expressive way to create, edit, and compose images and supports currently the two most common image processing libraries GD Library and Imagick.
    2. PDF to image is a library that makes it easy to work with the PDF files and helps convert PDF files to images using Imagick and Ghostscript.

    FAQs

    • What is the difference between ImageMagick and Imagick?

      ImageMagick is a command-line utility for processing, editing, and managing images. It is available for all different kinds of operating systems, and you can use it as a standalone application or a library. ImageMagick supports hundreds of image formats and can perform a wide range of image manipulation operations, such as resizing, cropping, color correction, watermarking, and more.

      Imagick is a PHP extension of ImageMagick. It provides a native implementation of the ImageMagick API for PHP, which means you can use ImageMagick’s features and functions within your PHP scripts. Imagick is useful for creating dynamic images, generating thumbnails, applying filters, and other tasks that require image processing in PHP.

      To use Imagick, you need to have ImageMagick installed on your server and enable the Imagick extension in your php.ini file.

    • What is GD in WordPress?

      GD is a PHP extension that can handle image processing in WordPress. It is similar to Imagick, but it has some limitations, such as supporting fewer image formats and producing lower-quality images. However, GD is more widely available on web hosting servers and may be faster than Imagick in some cases.

      To use GD in WordPress, you need to have it installed and enabled on your server. You can check if GD is available by using the phpinfo() function.

    • What PHP Extensions does WordPress need ?

      These are essential PHP extensions for WordPress:
      json: Handles communication with other servers and processes data in JSON format.
      mysqli or mysqlnd: Connects to the MySQL database for content storage and user data management.
      curl: Performs remote requests.
      dom: Validates Text Widget content and configures IIS7+.
      exif: Works with image metadata.
      fileinfo: Detects file upload mimetypes.
      hash: Used for hashing (including passwords).
      igbinary: Optimizes serialization.
      imagick: Enhances image quality.
      intl: Enables locale-aware operations.
      mbstring: Handles UTF8 text.
      openssl: For SSL-based connections.
      pcre: Improves pattern matching.
      xml: Used for XML parsing.
      zip: Handles zip archives.
      These extensions empower WordPress, ensuring seamless functionality and compatibility with plugins and themes. 🌟🔧

    • How to Install ImageMagick in cPanel?

      To install ImageMagick in cPanel, log in to WHM using your root credentials.
      Navigate to the Software tab and select Module Installers.
      Click Manage next to PHP PECL, search for “Imagick,” and click Install.

    • Do I need Imagick for WordPress?

      Imagick is not strictly required for a basic WordPress installation, but it significantly enhances image quality and functionality. If you plan to work extensively with images, such as resizing, optimizing, or creating thumbnails, Imagick is highly recommended.

    • How to Fix ImageMagick PHP module not found?

      To fix the ImageMagick PHP module issue on WordPress, you need to install and enable the module on your server using cPanel, SSH, or web hosting support. Then, you can check the module status on your WordPress dashboard under “Tools” > “Site Health”.

    Summary

    In this post, we will walked you through the steps to install the ImageMagick PHP extension for your web application on RunCloud, the best web application management platform for developers and agencies. If you are looking to move away from Cpanel then you should check out RunCloud.

    If you are not using RunCloud yet, you are missing out on a lot of benefits and features that can make your web development and hosting experience easier and faster. With RunCloud, you can host as many websites as you like on a single server.

    Sign up for RunCloud today to see how RunCloud can help you manage your web applications and servers with ease and convenience.

  • 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!

  • The 7 Best WordPress Staging Plugins to Create a Test Site

    The 7 Best WordPress Staging Plugins to Create a Test Site

    It is important to test any new changes and updates before apply to your live site. It can prevent some unexpected errors and downtime. We use a Staging site to create a testing environment.

    A staging site is a duplicate copy (or clone) of your live website. It allows you to do customizations, test new features, install a new plugin, and more without affecting the live site. Your website visitors won’t be interrupted while you are working on the staging site. Some staging site setups even allow you to push the changes to the live site.

    IMPORTANT! RunCloud has released One-click WordPress Staging feature that allows you to create an exact copy of your entire website (web application) for staging and development purpose in seconds.

    Quick guide on how to easily create a WordPress staging site in RunCloud →

    In this article, you will learn about some WordPress staging plugins, both free and paid, that will create a staging site for the testing environment.

    1. WP Staging (Free)

    WP Staging is probably the easiest way to create a staging site in just a few clicks. It creates a clone of your website into a subfolder. In the background, the files and database are copied and the links within the content also replaced with the new path.

    Simple instructions:

    1. Install WP Staging plugin on main site
    2. Name your staging site (a subfolder) and start cloning using WP Staging
    3. Login to your new staging site

    The free plugin has 40,000 active installations and 5-stars ratings. The Pro edition supports WordPress multisites, cloning for subdomains, and the ability to copy modifications from staging site to the live website.

    WP Staging

    2. All-in-One WP Migration (Free)

    All-in-One WP Migration is a popular plugin to migrate WordPress site from one host to another. The fact that it package the whole site (files & database) for easy migration, make it also ideal to create a staging site.

    You will need to install WordPress on the staging site before you can import the All-in-One WP Migration website package file. The staging site can be a subfolder, subdomain, or even a different domain. The maximum website export size limit is 512MB.

    Simple instruction:

    1. Install WordPress on staging site
    2. Install All-in-One WP Migration plugin on both main and staging sites
    3. Export main site using All-in-One WP Migration with staging site URL replacement
    4. Import the website package file on staging site
    5. Done.

    The free plugin has over 2 million active installations and 4.5 stars ratings (5000+ 5 Stars). The plugin’s premium extensions support unlimited website size, cloud storage, multisite, and more.

    All-in-One WP Migration

    3. Duplicator (Free)

    Duplicator is another popular WordPress migration plugin like All-in-One WP Migration. It creates a package file and installer for easy website restoration on a blank site. Need not have existing WordPress installation on the target site.

    Simple instruction:

    1. Install Duplicator plugin
    2. Create a new package using Duplicator
    3. Download the installer and package file
    4. Upload installer and package file to target site (subfolder, subdomain, or domain)
    5. Run the Duplicator installer to restore website
    6. Done.

    The free plugin has over 1 million active installations and 5 stars ratings. The Pro version supports scheduled backups, cloud storage, multisite, cPanel integration, and more.

    Duplicator

    4. BackupBuddy (Paid)

    BackupBuddy plugin to create WordPress staging site

    BackupBuddy is a premium backup plugin from iThemes that supports scheduled automatic backups and store backup files off-site. It includes a Deployment feature, which you can push or pull WordPress staging site’s changes back and forth between the staging site and the live site.

    How to setup WordPress staging site with BackupBuddy Deployment

    1. Install BackupBuddy plugin and make a backup of your Live Site
    2. Create a Staging site by restoring your backup on a new domain (or sub-domain)
    3. Add define('BACKUPBUDDY_API_ENABLE', true); to the wp-confg.php file of your Live Site.
    4. On the Live Site, goto BackupBuddy > Remote Destinations and select Show Deployment Key at the top of the page
    5. Copy the given API key
    6. On the Staging Site, goto BackupBuddy > Remote Destinations and click the Add New option and then select BackupBuddy Deployment
    7. Paste the API key you copied from the Live Site into your Staging Site

    Price: iTheme BackupBuddy price starts from $80/year for 1 site.

    BackupBuddy

    5. WP Stagecoach (Paid)

    WP Stagecoach is a premium one-click WordPress staging site solution that work on any host and does not overwrite database during import.

    The database merging is an unique feature that allows you to push staging site changes to live site without replacing the live site’s database. WP Stagecoach monitor and keep a database changes log on the staging site. It then “playback” database changes during import to live site.

    WP Stagecoach can host your staging site on their server, so you can test the site in a isolated environment, and saving hosting disk space usage. During site import, you can import files, database or both.

    Price: WP Stagecoach price starts from $120/year for 10 domains.

    WP Stagecoach

    6. BlogVault (Paid)

    BlogVault is a premium WordPress cloud backup plugin with staging site feature. It offer one-click WordPress staging site that host on its server. The staging site is password-protected and block search engine indexing by default.

    BlogVault also handle WordPress database merging when you import staging site changes to the live site. The 1-click Merge feature allows you to compare Live and Staging site, then do complete merge in a single click or selective merge handpick modifications.

    Price: BlogVault price starts from $89/year for 1 site.

    BlogVault

    7. ManageWP (Free/Paid)

    ManageWP is an online WordPress website management tool. It is free to use for unlimited websites with optional premium add-ons. With the premium backup, it can clone your website to an existing website or another server. It does not offer hosting for staging websites.

    ManageWP Smart Clone will compare the source and destination files. Skip the same files and clone only the different files and the database.

    Price: Free. Requires Premium Backup ($2/month per site) for clone/staging feature.

    ManageWP

    Bonus Tips

    A staging site is a duplicate of your live site. In search engine optimization (SEO), duplicate pages are bad for your website ranking. You should avoid search engines from indexing your staging site. The good news is that it is easy to disallow index.

    Here are few ways to disallow index on your staging site:

    1. Add “noindex” tag to your staging site. Goto Settings > Reading and check the box for Discourage search engines from indexing this site
    2. Password protect your staging site using RunCloud’s HTTP basic authentication.
    3. Create a robots.txt text file in the WordPress installation root of your staging site. And add these two lines:
    User-agent: *
    Disallow: /

    Summary

    Having a WordPress staging site is important for testing changes before you push them to live site. Setting up a WordPress staging site is easy with the various plugins listed here.

    WP Staging is great to create a simple staging site. All-in-One WP Migration and Duplicator are backup plugins but also can be used to create a clone of live site for testing purpose. Premium plugins offer more features and support pushing staging site updates to the live site.

    How do you create a staging site? Please tell us in the comment.

  • RunCloud Education To Equip Graduates with Cloud Computing Skills

    RunCloud Education To Equip Graduates with Cloud Computing Skills

    RunCloud Education will conduct Train-the-Trainer (TTT) programme to lecturers from 9 Premier Universities this year.

    PUTRAJAYA, 8 APRIL 2019 – In efforts to reduce the knowledge gap in cloud computing and cloud deployment among Computer Science students in universities, RunCloud Sdn Bhd in collaboration with Malaysia Digital Economy Corporation (MDEC) and the Department of Industrial Relations, Ministry of Education organized a briefing on RunCloud Education at the Ministry of Education, Putrajaya. The briefing was attended by lecturers from the Computer Science Faculty of 9 Premier Universities.

    Muhammad Arif Tukiman, Chief Executive Officer of RunCloud Sdn Bhd, led the briefing session and highlighted that the rapid growth of cloud computing around the world has made cloud technology an important tool in everyday businesses; and thus technical skills, especially in cloud computing, is increasingly being sought after by employers. “In today’s business, the demand for this skill is increasing as many businesses in Malaysia have started implementing cloud computing in their business processes. Graduates with skills and knowledge in cloud computing will have an advantage when competing with others in securing jobs.”

    As part of RunCloud Education, there will be a “Train-the-Trainer” (TTT) programme for the lecturers conducted by a professional trainer: Mr Iszuddin Ismail, President of Persatuan Usahawan Dan Industri ICT Bumiputera Malaysia (NEF) and Chief Technology Officer of Taming Tech Sdn Bhd. The lecturers, upon attending the programme, will be transferring this knowledge on cloud management/deployment to their students which they will use for their final year project and as additional skills on top of what they have learned during their studies.

    Arif emphasized that the best student in this programme will be officially selected as ‘RunCloud Campus Ambassador’ where the student will receive exclusive opportunities from RunCloud which will benefit the student’s future career path. The student will also be given the opportunity for early exposure to real-world working experience through community engagements and attending networking events with partners of RunCloud.

    “The 4th Industrial Revolution is a rapidly re-inventing the job landscape and RunCloud’s efforts are very much in line with MDEC’s strategy to catalyse public-private collaboration in developing local tech talents.” commented Sumitra Nair, MDEC’s Vice President for Talent and Digital Entrepreneurship, who was also present during the briefing session. “We looking forward to working with more industry players to jointly future proof our upcoming talent pool”.

    RunCloud Education will be officially launched during the MDEC Tech Week from 17th to 21st June 2019. RunCloud is targeting to launch their education programme in the 4th quarter of 2019 to the US and Europe markets. Arif positively stated that RunCloud is aiming to empower 10,000 students globally by the end of 2019.

    RunCloud Education

    RunCloud Education

    RunCloud Education