Set up Cache Warming on RunCloud with Optimus Prime

Here is a tutorial on adding a cache warming tool: Optimus Prime on a RunCloud instance, your site will need to have an xml sitemap similar to the one provided by Yoast WordPress SEO.

RunCloud also has preloading as an option in their Runcache plugin, the Optimus Prime cache warmer can help when that is purged and speeds up all pages being primed and ready to go.

(There is a more Optimus Prime focused cPanel guide here).

Install Optimus Prime

Log in to your server via SSH and change directory to:

cd /usr/local/bin

Get Optimus Prime and extract the archive:

wget -c -O - | tar -xz

Use Optimus Prime manually

From the command line use:


Better Usage – Set Up a Cron Task

Log in to RunCloud control panel, choose your server and click Cron Job then click Create

Cron Optimus Prime

Add in the command:


Cron Optimus Prime Task

The user is runcloud adjust the command by swapping in your domain.

Then set your time, I use every 15mins

Cron Optimus Prime Task Time

You can pick whatever frequency you like, cron guru can help with settings. Job done and cache constantly primed.

You can also set up the cron task on the command line.

Higher Frequency/Large Volume

Should you have a large site and/or want a real short interval for the command to run you may get multiple instances of the command running which cancel out what has been primed – there is an additional script option that allows the command to run uninterrupted. This script called is from the same developer.

Change into the ocp directory:

cd /usr/local/bin/ocp

Get script:


Make it executable

chmod +x /usr/local/bin/ocp/

Now in your cron task change the command so controls ocp which queries the sitemap

/usr/local/bin/ocp/ /usr/local/bin/ocp/ocp


If your server is getting hammered you can restrict ocp usage by limiting the amount of pages it primes per minute, add a -c parameter followed by a number to set the amount of pages per minute.

So now your cron commands would be like so:


/usr/local/bin/ocp/ /usr/local/bin/ocp/ocp -c 10


/usr/local/bin/ocp/ocp -c 10

That’s it – enjoy the speed.