Engineering

⌘K
  1. Home
  2. Docs
  3. Engineering
  4. WordPress
  5. RunCloud

RunCloud

Starting August 2021, we’re using RunCloud to manage WordPress sites (previously we’re using WordOps). Note: RunCloud doesn’t support Arm64 too.

Launching RunCloud-powered Lightsail

  1. Use Pulumi to create Lightsail instance
  2. Make sure to open port 34210 as well as port 22, 80, 443
  3. Important: If you use “user data” to do apt-get update && apt-get -y full-upgrade, wait until the process is complete! Otherwise RunCloud agent installation will fail and server will be unstable.
  4. Install RunCloud agent
  5. After adding an app, you will need to generate SSL certificate
  6. Go to Settings > Permalink and click Save. This is needed in order to regenerate .htaccess.
  7. Add the “cron for backup” workaround in .htaccess. See section below.

LiteSpeed: Cron for Backup Workaround

LiteSpeed appears to have problems with all WordPress scheduled tasks that last more than a very short time – including all backup plugins. Adding this in an early position in the .htaccess file in your WordPress root folder may fix the problem:

RewriteRule .* - [E=noabort:1]

Reference: UpdraftPlus FAQ

LiteSpeed Cache Plugin

If you are using OpenLiteSpeed server, after restoring WordPress using UpdraftPlus, make sure to reinstall LiteSpeed Cache plugin. With these settings:

Then remove:

  • Nginx Helper
  • Redis Object Cache

SSH to RunCloud Instance

Set ~/.ssh/config as follows:

Host wpsites07-sg
        HostName IP_ADDRESS
        User runcloud
        PreferredAuthentications password
        PubkeyAuthentication no

Then you can: (prepare the password)

ssh wpsites07-sg

How to Change WordPress Site URL using WP CLI

Example:

cd ~/webapps/www_garudasystrain_co_id
wp search-replace 'https://next.garudasystrain.co.id' 'https://www.garudasystrain.co.id' --skip-columns=guid
wp cache flush

Migrating WordPress to RunCloud’s

Estimated time: 2 hours. (assumption: database & uploads size is reasonable)

  1. Before moving, disable Redis Object Cache and Nginx Helper.

Troubleshooting: 404 Not Found Error, Especially with TranslatePress and Directorist

Reference: https://wordpress.org/support/topic/getting-404-page-after-using-lsws-and-ls-cache/

  • For any trouble, disable LiteSpeed Cache first, and run for several days without it activated
  • Go to Settings > Permalink, then click Save
  • Flush cache

How can we help?