Cache plugins not working after enabling SSL-certificate
-
Hi,
I have a wordpress site on a LAMP stack from Digital Ocean.
After enabling SSL-certificate cache plugins don’t work with different errors.
I’m wondering if I should change some SSL settings rather than start fighting to get the plugins to work?
WP Super Cashe gives me this error:
Warning! Could not update /var/www/html/wp-config.php! WPCACHEHOME must be set in config file.
Warning! /var/www/html/wp-content/advanced-cache.php does not exist or cannot be updated.
If it already exists, please delete the file first.
Make /var/www/html/wp-content writable using the chmod command through your ftp or server software. (chmod 777 /var/www/html/wp-content) and refresh this page. This is only a temporary measure and you’ll have to make it read only afterwards again. (Change 777 to 755 in the previous command)
Refresh this page to update /var/www/html/wp-content/advanced-cache.php
If that doesn’t work, make sure the file /var/www/html/wp-content/advanced-cache.php doesn’t exist:
Open /var/www/html/wp-content/plugins/wp-super-cache/advanced-cache.php in a text editor.
Change the text CACHEHOME to /var/www/html/wp-content/plugins/wp-super-cache/
Save the file and copy it to /var/www/html/wp-content/advanced-cache.php and refresh
this page.I managed to move all error codes but I couldn’t enable caching.
Change the text CACHEHOME to /var/www/html/wp-content/plugins/wp-super-cache/
Now it looks like this:
<?php
// WP SUPER CACHE 1.2
function wpcache_broken_message() {
global $wp_cache_config_file;
if ( isset( $wp_cache_config_file ) == false ) {
return ”;
}$doing_ajax = defined( ‘DOING_AJAX’ ) && DOING_AJAX;
$xmlrpc_request = defined( ‘XMLRPC_REQUEST’ ) && XMLRPC_REQUEST;
$rest_request = defined( ‘REST_REQUEST’ ) && REST_REQUEST;
$robots_request = strpos( $_SERVER[‘REQUEST_URI’], ‘robots.txt’ ) != false;$skip_output = ( $doing_ajax || $xmlrpc_request || $rest_request || $robots_request );
if ( false == strpos( $_SERVER[‘REQUEST_URI’], ‘wp-admin’ ) && ! $skip_output ) {
echo ‘<!– WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. –>’;
}
}if ( false == defined( ‘WPCACHEHOME’ ) ) {
define( ‘ADVANCEDCACHEPROBLEM’, 1 );
} elseif ( ! include_once WPCACHEHOME . ‘wp-cache-phase1.php’ ) {
if ( ! @is_file( WPCACHEHOME . ‘wp-cache-phase1.php’ ) ) {
define( ‘ADVANCEDCACHEPROBLEM’, 1 );
}
}
if ( defined( ‘ADVANCEDCACHEPROBLEM’ ) ) {
register_shutdown_function( ‘wpcache_broken_message’ );
}How is it supposed to look to make caching work?
Thank you!
The page I need help with: [log in to see the link]
The topic ‘Cache plugins not working after enabling SSL-certificate’ is closed to new replies.