Question

This is a challenge for the sharpest and most experienced WordPress specialists

I am building a site in the WP Twenty Fifteen theme.

I created a bare-bones minimum home page at http://bit.ly/1zlmpKS

The first time you hit the page, it looks fine. When you refresh the browser you get a series of funny characters:

enter image description here

How can I fix this?

Amendment: Not sure how or if this relates and does what it does, but when I am logged into WordPress (as Super Admin) the home page never displays the funky characters. I can refresh and refresh and refresh dozens of times and it displays fine everytime. But the minute I logout of WP the home page shows the funny characters. I have an inner page on the new site as well, and it renders fine, consistently and all the time.

Background & History: I started out installing the Quark theme. Then I created my own "starter" child theme for the site. I could never get the child theme to take until, say hours later, all of a sudden my child theme started working. So I continued trying to tweak the child theme just to see if I could use it as a building block for my new site. Admittedly, this is my first crack at using the Quark starter theme and my first attempt to learn and utilize a child theme. Well after days of frustration, I thought maybe the W3 Total Cache plugin was the issue. So I network-deactivated it. Still no luck. Then I pulled out the child theme and the Quark theme and simply went with the WP out-of-the box Twenty Fifteen theme. That's when the funny characters surfaced. So I believe somehow and someway the W3 Total Cache plugin is messing with this network and the network site. I have dozens of other sites on my Multisite network install and none of them are misbehaving. W3 Total Cache is a standard plugin I activate for each new network I setup on my server. I have a shortlist of standard plugins I use across all networks and W3 Total Cache is one of them. Oh well...I am at a total loss.

Something else that's peculiar: When you hit the home page - it's fine. When you refresh the home page it renders the funny characters. But then if you wait for 5-10 mins and hit the home page again it renders fine. What might that mean in the WordPress world?

Next Trial & Error Test: I just re-installed Quark theme and network activated my Child Theme. The theme works -- so it is not a theme issue. The funny characters still appear on the home page on refresh under the Quark Child Theme. So it is some sort of unexplained caching issue, I think.

Was it helpful?

Solution

Solved it thanks to [at]OnethingSimple and @milo.

It was the W3 Total Cache plugin. I removed it from my server and everything works fine.

Here's the path I had to take.

Step 1 - went into my network admin on the site having the problem to confirm that W3TC was not activate or network active -- and it was not.

Step 2 - walked through each of my other networks (over a dozen) to Network Deactivate the W3TC plugin -- again it is one of the standard plugins I install on every new network.

Here's was an interesting finding: enter image description here

Each network site showed this error screen. But I proceeded to Network Deactivate the W3TC plugin anyway on each and every one of my networks.

Step 4 - After network deactivating the plugin, I proceeded to Delete it from the network admin panel on my primary site. When I did, I got this error on screen:

W3 Total Cache Error: some files appear to be missing or out of place. Please re-install plugin or remove /home/abcdefg/public_html/wp-content/advanced-cache.php.W3 Total Cache Error: some files appear to be missing or out of place. Please re-install plugin or remove /home/abcdefg/public_html/wp-content/db.php.W3 Total Cache Error: some files appear to be missing or out of place. Please re-install plugin or remove /home/abcdefg/public_html/wp-content/object-cache.php.

So I looked at the Drop-ins plugins as shown below:

enter image description here

Step 5 - next I FTP'd onto my server and deleted these 3 files:

./wp-content/advanced-cache.php ./wp-content/db.php ./wp-content/object-cache.php

Step 6 - I tried to delete these 2 directories via FTP and could not. So I telnet'd into server as root and deleted them:

./wp-content/cache ./wp-content/w3tc-config

Step 7 - I then removed this line of code from wp-config.php:

define('WP_CACHE', true); // Added by W3 Total Cache

Step 8 - I then removed these blocks of directives from .htaccess:

# 2015-02-05 updated as part of install of W3 Total Cache Plugin
# BEGIN W3TC Page Cache core
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
    RewriteRule .* - [E=W3TC_PREVIEW:_preview]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} =""
    RewriteCond %{REQUEST_URI} \/$
    RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
    RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html" -f
    RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html" [L]
</IfModule>
# END W3TC Page Cache core

# 2014-09-18 added as part of install of W3 Total Cache Plugin
# BEGIN W3TC Browser Cache
<IfModule mod_deflate.c>
    <IfModule mod_headers.c>
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
        AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
    <IfModule mod_mime.c>
        # DEFLATE by extension
        AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
</IfModule>
# END W3TC Browser Cache

Step 9 - refreshed the home page on the site numerous, numerous times. NO MORE FUNNY CHARACTERS !!!

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top