I don't have any idea what going wrong with my wordpress file, When i tried to open a file after downloading, the downloaded file got compressed in single like like:
<?php/** * The Header for our theme. * * Displays all of the <head> section and everything up till <div id="main"> *
and the actual file is like:
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*
the problem with this, when i tried to upload new files then also compressed and not working properly. I have installed WP Super Cache plugin to cache the pages for increasing the page load speed with cache, I am not sure if this plugin is behind all this.
Instead of wp super cache i have added some code in my htaccess file:
RewriteEngine On
RewriteBase /blog/
# here are few rewrite rules for 301 permanent redirect
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
Header unset ETag
FileETag None
<filesMatch "\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, private"
Header set Expires "Sun, 23 October 2011 20:00:00 GMT"
</filesMatch>
<filesMatch "\.(css|css.gz)$">
Header set Cache-Control "max-age=604800, private"
</filesMatch>
<filesMatch "\.(js|js.gz)$">
Header set Cache-Control "max-age=604800, private"
</filesMatch>
<filesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=216000, private, must-revalidate"
</filesMatch>
<filesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=7200, private, must-revalidate"
</filesMatch>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
Can anyone please help me what wrong i have done..
UPDATE:
I don't have any idea what going wrong with my wordpress file, When i tried to open a file after downloading, the downloaded file got compressed in single like like:
<?php/** * The Header for our theme. * * Displays all of the <head> section and everything up till <div id="main"> *
and the actual file is like:
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*
the problem with this, when i tried to upload new files then also compressed and not working properly. I have installed WP Super Cache plugin to cache the pages for increasing the page load speed with cache, I am not sure if this plugin is behind all this.
Instead of wp super cache i have added some code in my htaccess file:
RewriteEngine On
RewriteBase /blog/
# here are few rewrite rules for 301 permanent redirect
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
Header unset ETag
FileETag None
<filesMatch "\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, private"
Header set Expires "Sun, 23 October 2011 20:00:00 GMT"
</filesMatch>
<filesMatch "\.(css|css.gz)$">
Header set Cache-Control "max-age=604800, private"
</filesMatch>
<filesMatch "\.(js|js.gz)$">
Header set Cache-Control "max-age=604800, private"
</filesMatch>
<filesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=216000, private, must-revalidate"
</filesMatch>
<filesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=7200, private, must-revalidate"
</filesMatch>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
Can anyone please help me what wrong i have done..
UPDATE:
Share Improve this question edited Feb 8, 2019 at 23:58 fuxia♦ 107k39 gold badges255 silver badges461 bronze badges asked Sep 28, 2013 at 18:33 jogesh_pijogesh_pi 2674 silver badges16 bronze badges 6 | Show 1 more comment1 Answer
Reset to default 0Caching plugins are complicated beasts. They install a number of components that other plugins typically do not. You can't just switch them off. For example, the uninstall routine for WP Super Cache is:
- Turn off caching on the plugin settings page and clear the cache.
- Deactivate the plugin on the plugins page.
- Remove the WP_CACHE define from wp-config.php. It looks like define( 'WP_CACHE', true );
- Remove the Super Cache mod_rewrite rules from your .htaccess file.
- Remove the files wp-content/advanced-cache.php and wp-content/wp-cache-config.php
- Remove the directory wp-content/cache/
- Remove the directory wp-super-cache from your plugins directory.
My guess is that you have not completely uninstalled one or both of the plugins and are seeing the consequences. You need to go through the uninstall instructions for the caching plugins and make sure that you get everything cleaned up properly.
.htaccess
back to default, and disable your plugins one by one, to start. – s_ha_dum Commented Oct 2, 2013 at 14:04