Title: Preloading not working
Last modified: August 24, 2016

---

# Preloading not working

 *  Resolved [jardeath](https://wordpress.org/support/users/jardeath/)
 * (@jardeath)
 * [11 years ago](https://wordpress.org/support/topic/preloading-not-working/)
 * Hi there,
 * I’m moving a WordPress 4.2.1 site over to a new server however cache pre loading
   seems to not be working, it works fine on the original server.
 * Normally when I run the pre load, if I tail the access log I can see the server
   itself requesting the pages, I assume as it builds the cache. This is not happening
   on my new server though.
 * I don’t have any supercache files at all unless I first browse to a page, is 
   that normal? So basically at the moment wp-content/cache/supercache/www.domain.
   com is completely empty, but if I browse to [http://www.domain.com](http://www.domain.com)
   it will generate the page and load it. I’m assuming that the pre load would fill
   the supercache directory with all of the posts? Should that be what happens?
 * The new server is running Nginx and php-fpm while the old server is running Apache,
   not too sure if that makes a difference. I have followed this link in order to
   get my nginx rules in place rather than using .htaccess: [http://forum.slicehost.com/index.php?p=/discussion/2087/nginx-rewrite-rules-for-wordpress-wp-super-cache/p1](http://forum.slicehost.com/index.php?p=/discussion/2087/nginx-rewrite-rules-for-wordpress-wp-super-cache/p1)
 * The new server is also using “Use mod_rewrite to serve cache files. (Recommended)”,
   while the old server I was using the PHP option. After adding the rules in the
   previous link I found I could successfully stop php-fpm and cached pages would
   be served correctly without error so they seem to work as intended.
 * I still get a warning in the web interface about there being no mod_redirect 
   detected, which is expected. Perhaps there is a problem with preload if mod_redirect
   is not detected?
 * [https://wordpress.org/plugins/wp-super-cache/](https://wordpress.org/plugins/wp-super-cache/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [jardeath](https://wordpress.org/support/users/jardeath/)
 * (@jardeath)
 * [11 years ago](https://wordpress.org/support/topic/preloading-not-working/#post-6085985)
 * Now when I load the page for the first time, the supercache directory for the
   page is created, but the .html and .gz pages are no longer created. I think the.
   html files are being created in the legacy area however, though not sure why.
 * I do have the message still about there being no mod_rewrite (correct, Nginx 
   is in use), does the code disallow this mode working properly if mod_rewrite 
   cannot be detected?
 *  Thread Starter [jardeath](https://wordpress.org/support/users/jardeath/)
 * (@jardeath)
 * [11 years ago](https://wordpress.org/support/topic/preloading-not-working/#post-6085994)
 * I turned on the debug option in the plugin, and the cache files started generating
   again. Turned it back off and still working. I have no idea how that resolved
   the problem, or if it will crop up again.
 * This also seems to have fixed the .gz files generating without the initial white
   page, the bug resolved in [https://wordpress.org/support/topic/421-initial-blank-page-load?replies=15](https://wordpress.org/support/topic/421-initial-blank-page-load?replies=15)
   however I don’t think this has yet been patched outside of the dev version, so
   no idea what’s going on there.
 * It did not fix preload however, which still does not work.
 *  Thread Starter [jardeath](https://wordpress.org/support/users/jardeath/)
 * (@jardeath)
 * [11 years ago](https://wordpress.org/support/topic/preloading-not-working/#post-6085995)
 * I think I’ve narrowed it down a bit more, I recopied the whole site over from
   the old working server to the new one and the same problems were back.
 * I turned on debug mode, turned on gzip, disabled debug, turned on gzip, and the
   files are now generating correctly.. Preload still not working however.
 * I then went to test something else and I changed the name of the whole URL in
   General for the wordpress site itself, I then found that under the new name it
   had preloaded all of the pages into a new supercache directory with this new 
   name somehow, but not the original correct name.
 * Is there any other way to make a preload happen? I’m thinking of just making 
   something to run a GET on all posts every week or something.. Can anyone provide
   further info on what happens when you actually click preload? What should I look
   into? What is it that makes the pages request? I don’t see any requests coming
   into the logs at all as you normally would when it works.
 *  Thread Starter [jardeath](https://wordpress.org/support/users/jardeath/)
 * (@jardeath)
 * [11 years ago](https://wordpress.org/support/topic/preloading-not-working/#post-6085996)
 * So I’ve fixed the problem, I think the problem was that the preload was trying
   to hit the full URL of the site when doing the GET requests, problem is DNS points
   to my old server. I added my domain to /etc/hosts for 127.0.0.1 and instantly
   the preload begun.
 * This explains why when I changed the site URL it worked, because that particular
   URL I changed it to correctly resolved to the server.
 * It’s a bit strange that the .gz white page bug seems to have disappeared to without
   the plugin being updated, I saw in another post it was patched in the dev build
   only so far.
 *  [satsoklit](https://wordpress.org/support/users/satsoklit/)
 * (@satsoklit)
 * [11 years ago](https://wordpress.org/support/topic/preloading-not-working/#post-6086003)
 * it doesn`t work for me, however i can build all cache files by running a script
   inside a .html file, the script is running on any browser and just changes page
   every 5 seconds, this time can be adjusted to less or more.
 *     ```
       <html>
       	<head><title>Reload</title>
       	<SCRIPT LANGUAGE="JavaScript1.2" type="text/javascript"><!--
       		function reload(){
       			var strI=document.stored.Arrayvalue.value;
       			var str = new Array(x);
       			// insert target URLs between quote marks in array items below.
       			// To add or remove the total number items in the array, add
       			// lines to or remove lines from the array below and
       			// modify the number in "Array()" above and "strI" below to
       			// be one greater than the last "str[]" value below.
          str[1] = "http://www.domain.com/page-1/";
          str[2] = "http://www.domain.com/page-2/";
          str[3] = "http://www.domain.com/page-3/";
        .........................................................
          str[x] = "http://www.domain.com/page-x/"
   
       				if( strI==x+1){
       					strI=1;
       					}
       				else{
       					URL=str[strI];
       					window.open(URL,'EC');
       					strI++;
       					}
       				document.stored.Arrayvalue.value= strI;
       				var intNumber=Math.round(Math.random()*5000);
       				if(intNumber<5000){intNumber=intNumber+5000;}
       				setTimeout("reload()",intNumber);
       			}
   
       //-->
       </script>
       </head><body onLoad="reload();">
       	<form name="stored"><input type="Text" name="Arrayvalue" value="1"></form>
       </body></html>
       ```
   
 * x is the maximum pages number and x+1 is the next number

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Preloading not working’ is closed to new replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [preload](https://wordpress.org/support/topic-tag/preload/)

 * 5 replies
 * 2 participants
 * Last reply from: [satsoklit](https://wordpress.org/support/users/satsoklit/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/preloading-not-working/#post-6086003)
 * Status: resolved