Title: [Plugin: WP Super Cache] Cannot delete cache files when using https
Last modified: August 21, 2016

---

# [Plugin: WP Super Cache] Cannot delete cache files when using https

 *  [dopiaza](https://wordpress.org/support/users/dopiaza/)
 * (@dopiaza)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-cannot-delete-cache-files-when-using-https/)
 * When using HTTPS, the cache files are names index-https.html and index-https.
   html.gz, rather than index.html and index.html.gz. This causes two problems:
 * – On the ‘Contents’ page, when the file list is shown, two entries for each cached
   file appear.
 * – The encoded URI in the ‘X’ link to delete the file is incorrect – it includes
   the ‘index-https.html(.gz)’ where it should just contain the directory name.
 * Patch for wp-cache.php:
 *     ```
       --- wp-cache-original.php	2014-02-25 16:22:48.000000000 +0000
       +++ wp-cache.php	2014-03-17 12:24:24.000000000 +0000
       @@ -2225,6 +2225,8 @@
        			printf( __( "Deleting supercache file: <strong>%s</strong><br />", 'wp-super-cache' ), $supercacheuri );
        			@unlink( $cache_path . 'supercache/' . $supercacheuri . 'index.html' );
        			@unlink( $cache_path . 'supercache/' . $supercacheuri . 'index.html.gz' );
       +            @unlink( $cache_path . 'supercache/' . $supercacheuri . 'index-https.html' );
       +            @unlink( $cache_path . 'supercache/' . $supercacheuri . 'index-https.html.gz' );
        			prune_super_cache( $cache_path . 'supercache/' . $supercacheuri . 'page', true );
        			@rmdir( $cache_path . 'supercache/' . $supercacheuri );
        		}
       @@ -2468,11 +2470,11 @@
        			if ( $wp_cache_preload_on == false && $cache_max_time > 0 && $filem + $cache_max_time <= $now ) {
        				$sizes[ 'expired' ]+=1;
        				if ( $valid_nonce && $_GET[ 'listfiles' ] )
       -					$sizes[ 'expired_list' ][ $now - $filem ][ str_replace( $cache_path . 'supercache/' , '', str_replace( 'index.html', '', str_replace( 'index.html.gz', '', $directory ) ) ) ] = 1;
       +					$sizes[ 'expired_list' ][ $now - $filem ][ str_replace( $cache_path . 'supercache/' , '', str_replace( 'index.html', '', str_replace( 'index.html.gz', '', str_replace( 'index-https.html', '', str_replace( 'index-https.html.gz', '', $directory ) ) ) ) ) ] = 1;
        			} else {
        				$sizes[ 'cached' ]+=1;
        				if ( $valid_nonce && array_key_exists('listfiles', $_GET) && $_GET[ 'listfiles' ] )
       -					$sizes[ 'cached_list' ][ $now - $filem ][ str_replace( $cache_path . 'supercache/' , '', str_replace( 'index.html', '', str_replace( 'index.html.gz', '', $directory ) ) ) ] = 1;
       +					$sizes[ 'cached_list' ][ $now - $filem ][ str_replace( $cache_path . 'supercache/' , '', str_replace( 'index.html', '', str_replace( 'index.html.gz', '', str_replace( 'index-https.html', '', str_replace( 'index-https.html.gz', '', $directory ) ) ) ) ) ] = 1;
        			}
        			if ( ! isset( $sizes[ 'fsize' ] ) )
        				$sizes[ 'fsize' ] = @filesize( $directory );
       ```
   
 * [https://wordpress.org/plugins/wp-super-cache/](https://wordpress.org/plugins/wp-super-cache/)

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

 *  [geekseed](https://wordpress.org/support/users/geekseed/)
 * (@geekseed)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-cannot-delete-cache-files-when-using-https/#post-4715319)
 * Thanks doplaza. I’m not sure quite how to integrate this? Any additional tips
   would be appreciated.
 * I’d love to see a response from the plugin author – if we could get this fix 
   built in it would be great.
 *  [TomsRiverWebDesign](https://wordpress.org/support/users/tomsriverwebdesign/)
 * (@tomsriverwebdesign)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-cannot-delete-cache-files-when-using-https/#post-4715331)
 * [@dopiaza](https://wordpress.org/support/users/dopiaza/) I am using [WordPress HTTPS](https://wordpress.org/support/plugin/wordpress-https)
   and it only creates one cache file per url. What https plugin are you using if
   I could ask?
 * Scott

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

The topic ‘[Plugin: WP Super Cache] Cannot delete cache files when using https’ 
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/)

 * 2 replies
 * 3 participants
 * Last reply from: [TomsRiverWebDesign](https://wordpress.org/support/users/tomsriverwebdesign/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-cannot-delete-cache-files-when-using-https/#post-4715331)
 * Status: not resolved