Support » Plugin: W3 Total Cache » [Plugin: W3 Total Cache] WordPress SEO SItemap to preload cache

Viewing 9 replies - 1 through 9 (of 9 total)
  • I couldn’t get the W3TC plugin’s preloader to work with a sitemap index. I couldn’t get it to run with google XML sitemaps plugin either. Because I have a VPS, I set up Optimus Cache Prime instead to preload the cache.

    Hi Sven,

    Optimus Cache Prime does indeed, as Naifamoodi said, support sitemap index files. It will prime all of the URLs contained within each of the sitemap files that the sitemap index refers to. It can be run from any Windows or Linux box–it doesn’t have to be used on the server itself.

    An example from an external machine:


    Example with W3 Total Cache when running locally on your server:

    ./ocp -l /var/www/ -ls _index.html /var/www/

    The advantage of running it locally with something similar to the second example is that OCP checks whether the pages are already cached, and only primes the ones that aren’t, resulting in fewer requests to e.g. Apache.

    This sounds like a great resource – the Optimus Cache Prime. How do I go about using this on a Windows 7 machine once I’ve downloaded the application to my pc? I also have a Yoast/WordPress SEO sitemap.

    Many thanks!!

    Hi pnommensen,

    The easiest way is probably via a shortcut:

    • Download the latest Windows zip file from the OCP page
    • Right-click the zip file and select “Extract All…” -> Extract
    • Open the extracted folder “ocp”
    • Right-click ocp.exe and click “Create shortcut”
    • Call the shortcut something descriptive like “Prime sitemap”
    • Right-click the shortcut, click Properties, and change the target from e.g.
      (it’s important that there are double quotes around the path to ocp.exe)
    • Click OK, and then, whenever you want to prime the site, just click the shortcut

    If you want to run it on a schedule, you can add a task to run the shortcut on a certain schedule via Windows’ Task Scheduler (taskschd.msc).

    There are many options you can use. (For example, by default it doesn’t show any information about what it’s doing — you could add “-v” to the target line to make it more verbose.) If you want to see all of the available options, hold down shift and right-click somewhere in the folder containing OCP, select “Open command window here”, then type “ocp.exe”

    Hope that helps!

    That was easy, thanks!!

    Just out of curiosity: Couldn’t anyone re build the cache of any site out there if they know the link to their sitemap? It seems like there should maybe be some verification.

    If they wanted to. The only thing OCP really does is it reads the publicly available sitemap file that the site author has created, and crawls the site just like a search engine spider which has read the sitemap would, making normal GET requests for each of the URLs in the sitemap. (Basically the same as if you opened the sitemap.xml file in your browser and manually clicked every link.) Each GET request prompts the server to use whatever caching mechanism(s) it has in place, e.g. W3 Total Cache or WP-Super-Cache. OCP doesn’t decide what mechanism to use, nor how it should be used.

    It wouldn’t really be possible to have verification and keep OCP in its current form, a stand-alone piece of software. Besides, if somebody wanted to use it maliciously to e.g. perform a DoS attack, there are much “better” tools that they could use–ones that don’t care about sitemaps at all.

    If people receive unwanted hits from OCP, they can block the IP address of the person(s) using the tool, or block the user-agent, “Optimus Cache Prime”, itself.

    Hi Patrick,

    thanks a lot for your response. I am still a bit lost … I do not own a windows PC and I don´t know anything about Linux – shame on me …

    To install it on the Server where my wordpress installation is running – do I need root for that?

    Thanks and best regards

    Hi Sven,

    No root necessary, but do you do need shell access, e.g. via “ssh” in OS X. From the shell, you can do something like:

    (Copy the 32-bit or 64-bit link from the Optimus Cache Prime page depending on the architecture of your server. If you’re not sure which it is, you can try both of them–one of them will work.)

    1. wget <link>
    2. tar xfvz ocp-x.x-xxxxx.tar.gz
    3. cd ocp
    4. ./ocp

    If you don’t have shell access/can’t run commands on the server, e.g. if it’s a shared hosting environment, there’s no easy way to run OCP.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: W3 Total Cache] WordPress SEO SItemap to preload cache’ is closed to new replies.