• Hello,

    I have days struggling with this problem. Hopefully you can help me.

    I’m trying to install the latest version of W3 Total Cache in my blog.

    – I download the latest version in my wp-content/plugins folder
    – I unzip the contents of the file in my plugins folder
    – I go to my plugins page and I click the “Activate” plugin

    Immediately after clicking the link, the page throws me an error 500 page. Now all the wp-admin pages are behind this error 500 page. But the frontend pages work perfectly though, all the pages, posts, categories are viewed normally but the dashboard pages are behind this error 500.

    The weirdest thing is, There is no trace of this error 500 on the Apache logs. I spoke with my hosting provider and they said it’s a problem with the plugin. When I remove the plugin folder (w3-total-cache) the dashboard works again. But as soon as I activate the plugin everything falls apart.

    I made sure that:

    – All the WordPress are owned by the apache user
    – All the respective folders and files have the appropriate permissions (wp-content, .htaccess)
    – The .htaccess is being written by the w3-total-cache plugin. It adds all the # BEGIN W3TC Browser Cache lines.

    Do you guys have any idea what I’m missing here?

    Thank you very much

Viewing 7 replies - 1 through 7 (of 7 total)
  • W3TC attempts to create two directories under your /wp-content/ directory:

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

    Are those created upon activation? If not, try creating them manually and set the permissions to 755, then re-activate the plugin.

    Thread Starter plutoniumcore

    (@plutoniumcore)

    Yes, those folders are created. The advanced-cache.php file is also created in the same folder.

    All three folders and file have the correct permissions (755) and are owned by the apache user.

    Thread Starter plutoniumcore

    (@plutoniumcore)

    I also discarded a PHP memory issue by increasing the PHP memory limit to 128M and even 256M (I restarted the apache service after making those changes). But still see the error 500

    That’s really strange. It sounds like W3TC activation is working as expected, but there may be a conflict with another plugin that’s causing the 500 error when you try to load the admin interface.

    I’d start by going through the /wp-content/plugins directory and renaming each plugin directory to something like temp-myplugin to narrow down the possibilities. If removing one of these plugins allows you to access the admin interface while W3TC is activated, then you can start to debug the conflict between the plugins.

    I have discovered a whole lot of my php files in my WP install to be missing a closing php tag ‘?>’
    I am not sure if this was the way it was designed but it seems wrong and a friend of mine tells me that it can be the reason for a 500 error.

    Hi @quantumbee (luv your name)….

    In regards to your question about the missing closing php tag ‘?>’

    This is well documented. From the PHP Manual:

    The closing tag of a PHP block at the end of a file is optional, and in some cases omitting it is helpful when using include() or require(), so unwanted whitespace will not occur at the end of files, and you will still be able to add headers to the response later. It is also handy if you use output buffering, and would not like to see added unwanted whitespace at the end of the parts generated by the included files.

    Omitting the closing tag helps you prevent accidental whitespace or newlines from being added to the end of the file.

    Regards
    Kimberly

    I just got that, thanks. My friend just informed me of this method. I did find the actual trouble though, it is in the htaccess file located in the root directory or wp install directory. The plugin creates or rewrites the file and incorrectly, thereby creating a headache and frustration for anyone installing this to try and speed things up a bit.
    If insted, someone was to change it back to what it was or some version like this: https://codex.ww.wp.xz.cn/Giving_WordPress_Its_Own_Directory
    Then all would be well again. This is what I did and poof, all better again, though still as slow as it was before.

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

The topic ‘Error 500 upon plugin activation’ is closed to new replies.