WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] Error 403 Forbidden (22 posts)

  1. citybarguide
    Member
    Posted 3 years ago #

    Hi support team,

    I love your plugin as it dramatically improves the speed of the site. I have a challenge though, when the pludgin is activated an error 403 " forbidden " is displayed and my website will not load.

    Is there a way to resolve this?

    Please advise,
    Citybarguide

  2. djstelios
    Member
    Posted 3 years ago #

    I have "almost" the same problem.
    The site works fine from any browser, but when I'm trying to access it through a "page loading test" site (e.x. pingdom.com or websiteoptimization.com) the site reports always 403 error!

  3. jmillspaysbills
    Member
    Posted 3 years ago #

    gaaaah! Me too!

    I can't even log in. W3 total cache is becoming a huge pain in my rear.

  4. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Seems like there's an .htaccess issue. Can you submit a bug submission form from the support tab of the plugin?

  5. hmwind
    Member
    Posted 3 years ago #

    Unfortunately I have exactly the same problem.

    All access to the w3tc/pgcache directory is denied by the server. Had to un-install the Plugin again because spiders got a 403 Error.

  6. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    I'd really like to duplicate this, can anyone else with this issue contact me directly or via a bug submission form, so I can understand the issue?

  7. iqbalwp
    Member
    Posted 3 years ago #

    I have the same problem, and I think it has to do with .htaccess but in my case it's not unique to this plugin, may be because this is my first wordpress installation. Let me try to explain here (where is the bug submission form?

    I think my installation meets the requirement: WordPress 3-something
    I have installed and activated other plugins (those that doesn't htaccess) with success.
    I installed w3-total-cache successfully, and was brought to last step of installation page where it has a link to activate the plugin. I clicked it. Next page shown is a 403 forbiden access error.

    My .htaccess is now like this:

    # BEGIN W3TC Page Cache
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /blog/
        RewriteCond %{HTTP_USER_AGENT} (2\.0\ mmp|240x320|alcatel|amoi|asus|au\-mic|audiovox|avantgo|benq|bird|blackberry|blazer|cdm|cellphone|danger|ddipocket|docomo|dopod|elaine/3\.0|ericsson|eudoraweb|fly|haier|hiptop|hp\.ipaq|htc|huawei|i\-mobile|iemobile|j\-phone|kddi|konka|kwc|kyocera/wx310k|lenovo|lg|lg/u990|lge\ vx|midp|midp\-2\.0|mmef20|mmp|mobilephone|mot\-v|motorola|netfront|newgen|newt|nintendo\ ds|nintendo\ wii|nitro|nokia|novarra|o2|openweb|opera\ mobi|opera\.mobi|palm|panasonic|pantech|pdxgw|pg|philips|phone|playstation\ portable|portalmmm|ppc|proxinet|psp|pt|qtek|sagem|samsung|sanyo|sch|sec|sendo|sgh|sharp|sharp\-tq\-gx10|small|smartphone|softbank|sonyericsson|sph|symbian|symbian\ os|symbianos|toshiba|treo|ts21i\-10|up\.browser|up\.link|uts|vertu|vodafone|wap|willcome|windows\ ce|windows\.ce|winwap|xda|zte) [NC]
        RewriteRule .* - [E=W3TC_UA:_low]
        RewriteCond %{HTTP_USER_AGENT} (acer\ s100|android|archos5|blackberry9500|blackberry9530|blackberry9550|cupcake|docomo\ ht\-03a|dream|htc\ hero|htc\ magic|htc_dream|htc_magic|incognito|ipad|iphone|ipod|lg\-gw620|liquid\ build|maemo|mot\-mb200|mot\-mb300|nexus\ one|opera\ mini|samsung\-s8000|series60.*webkit|series60/5\.0|sonyericssone10|sonyericssonu20|sonyericssonx10|t\-mobile\ mytouch\ 3g|t\-mobile\ opal|tattoo|webmate|webos) [NC]
        RewriteRule .* - [E=W3TC_UA:_high]
        RewriteCond %{HTTPS} =on
        RewriteRule .* - [E=W3TC_SSL:_ssl]
        RewriteCond %{SERVER_PORT} =443
        RewriteRule .* - [E=W3TC_SSL:_ssl]
        RewriteCond %{HTTP:Accept-Encoding} gzip
        RewriteRule .* - [E=W3TC_ENC:.gzip]
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} =""
        RewriteCond %{REQUEST_URI} \/$
        RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register|mail)\.php|wp-.*\.php|index\.php) [NC,OR]
        RewriteCond %{REQUEST_URI} (wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php) [NC]
        RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in) [NC]
        RewriteCond "/data/12/0/48/44/700207/user/714156/htdocs/ctc/blog/wp-content/w3tc/pgcache/blog/$1/_index%{ENV:W3TC_UA}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}" -f
        RewriteRule (.*) "/blog/wp-content/w3tc/pgcache/blog/$1/_index%{ENV:W3TC_UA}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}" [L]
    </IfModule>
    # END W3TC Page Cache
    
    # 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

    The blog directory is correct (/blog)

    What else do you need to know?

  8. iqbalwp
    Member
    Posted 3 years ago #

    Update:
    Since our client needed the site active urgently, we called our provider and they said it was something from their end, and recommend us to

    not to use [wordpress] apps to upload, update, install / set any kind of file /folder permission. Instead they recommend using a 3rd party app like Fetch or other FTP upload application.

    I guess that means download everything including db to sync localhost, install, then upload everything. Hmm..

  9. iqbalwp
    Member
    Posted 3 years ago #

    Can you submit a bug submission form from the support tab of the plugin?

    I just reread that and wondered, how can we even go to the support tab of the plugin when the whole site is in 403.

  10. Tom Harrison
    Member
    Posted 3 years ago #

    I am having this problem on one of the sites I am managing, not others.

    how can we even go to the support tab of the plugin when the whole site is in 403

    Answer: the default configuration is to not cache for logged in users. I have one browser where I am logged in, and another where I am not for testing.

    I will submit a bug. In my case, it seems possible that the cause is because the site is installed in a subdirectory of the DocumentRoot of the site (e.g. ../htdocs/blog) so site_url and home_url are different. I am working on diagnosing it. I am pretty sure it's not simply a permissions problem -- I think a .htaccess is getting in the way.

    FYI, I was able to successfully restore site functionality by disabling the plugin.

    W3 Total Cache works great on several other sites.

  11. Tom Harrison
    Member
    Posted 3 years ago #

    After further investigation, I believe this error is most likely on a shared host -- one of the RewriteCond statements specifies the full filesystem path to a certain file, and it seems unlikely that a shared hosting apache server would have full access to the filesystem path.

    I have reported this as a bug to Frederick Townes.

    Tom

  12. Uli
    Member
    Posted 3 years ago #

    Hey, I have same problem. 403 errors on pretty much everything in my sitemap when you check by FETCH BY GOOGLEBOT in Google Webmaster Tools. Page load OK in browsers, but any bot sees 403 errors.

    Bad Behavior and W3 Total Cache seem to be the problem.

    Site: skinnychef.com
    WP 3.0.1
    Bad Behavior 2.0.38
    W3TC 0.9.1.3

  13. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    I was made aware of the case where the full file system path is "not ok" on some hosts. If anyone here who has not submitted a bug submission form (from the support tab of the plugin) already would allow me to test, that would be great because there are not a lot of these cases, but enough to warrant further investigation.

  14. ahomeniuk
    Member
    Posted 3 years ago #

    Hello, I just installed W3TC and somehow when I went to save the settings it gave me a 403 Forbidden error and now I can't access anything on my site. The wp-admin functions are not working as well as the entire site itself. Since I couldn't un-install it, I tried to delete the plugin from my server, but this did not help.
    I don't know how to submit a bug submission form
    the website is here http://bk.plcsports.com
    I'm not sure what to do and the site is down, any help would be appreciated. Thanks.

  15. Tom Harrison
    Member
    Posted 3 years ago #

    @ahomeniuk --

    One case of this (probably the one you're finding) is a result of an invalid rewrite rule in the .htaccess file for the site.

    If you have access to FTP to the site, fine the file .htaccess in the top level directory of your site. First make a backup copy. Then edit it with a text editor (not a word processor -- plain text characters only) and comment out all the lines between # Begin W3TC and # End W3TC by adding the # character at the beginning. There may be multiple sections of W3TC directives. Upload the new version of the .htaccess file, and this should get your site working again.

    It would be very helpful, if after you get the site back up you could write back -- I believe there is a fix for this and it would be great if you had a few minutes to try it out. I can provide more information then.

    Tom

  16. ahomeniuk
    Member
    Posted 3 years ago #

    okay had to reset all the permissions on my site to default and then uninstall the plugin. Not sure why this all happened.

  17. ahomeniuk
    Member
    Posted 3 years ago #

    thanks fivepercent - I didn't see your comment until after we'd reset everything.

  18. nrohilla
    Member
    Posted 3 years ago #

    @Frederick Townes
    For my site, when w3 total cache creates indel.html and index.html.gzip in w3tc/pgcache folder, it gives them 640 permission and hence other users can't access it.

    When I change permissions to 644 manually, it works.

    Do you have what could be causing it?
    Any help is well appreciated.

    Regards,
    Neeraj

  19. fergofer00
    Member
    Posted 3 years ago #

    Hi,
    I have version 0.9.2.1 of W3TC, and I also Error 403 occurs, specifically in Internet Explorer versions 7, 8 and 9. To check my site in "www.webpagetest.org", I discovered the error. I sent the bug form.

    In the tab "Page Cache-> Advanced-> Rejected User Agents" I added: MSIE. Now IE browsers do not return Error 403, but no pages are cached.

  20. John Schultz
    Member
    Posted 3 years ago #

    I just had the same issue with a 403 Forbidden on the cached version of the stylesheet only. And similar to nrohilla, most of the files in /wp-content/w3tc/min/ were set to 640 permissions. I manually changed them to 644 through FTP and everything worked again.

  21. Frederick Townes
    Member
    Plugin Author

    Posted 2 years ago #

    Ok, great.

  22. hmwind
    Member
    Posted 2 years ago #

    From what I Read in this forum I understand that this problem has not yet been corrected in a newer version of W3TC. Is that correct?

    Is there any new release planned with a fix for this?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic