Support » Plugin: WordPress Landing Pages » Error 500 on plugin activation

  • Resolved Carlo


    Hi Guys,
    i keep getting an error 500 from the server when i try to activate for the first time the Landing Pages plugin. Is it something you are already aware of or more likely there’s something wrong with my wordpress website?


Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author David Wells


    What does your htaccess file look like?



    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]



    Landing Page modifies the .htaccess file, which it doesn’t say in the documentation. This may be OK as long as (a) the file is writeable and (b) obviously apache is in use. I am using apache and nginx in reverse proxy and on installing this plugin got the message:

    400 Bad Request
    Request Header Or Cookie Too Large


    It also caused the Google Analytics Dashboard to fail.

    I deactivated it and everything returned to normal but deactivation leaves the .htaccess file modified with the following three lines:

    RewriteCond %{QUERY_STRING} !lp-variation-id
    RewriteRule ^go/([^/]*)? /wp-content/plugins/landing-pages/modules/module.redirect-ab-testing.php?permalink_name=$1  [QSA,L]
    RewriteRule ^langing-page=([^/]*)? /wp-content/plugins/landing-pages/modules/module.redirect-ab-testing.php?permalink_name=$1 [QSA,L]

    In my configuration .htaccess file is correctly obeyed as nginx is only used to deliver static files and cached files.

    If a plugin will only work with apache and if it modifies the .htaccess file in any way, this should be stated. It should also return .htaccess when deactivated. And as many people are now using nginx either raw or in reverse proxy, it may be worth providing some rewrites in that syntax.

    Plugin Author Hudson Atwell


    Hi Loggy,

    We use the WordPress core PHP api to add htaccess rules to the .htaccess file. We do not use fopen or fwrite though. I am under the impression that all WordPress installs regardless of the server makes use of .htaccess rule to operate permalinks. I’m not positive though. Maybe catch me up on how this works?

    In the next version we’ve added a flush permalink rules to the deactivation hook so this should take care of lp’s contribution to rewrite rules and clean the htaccess file.


    Try deleting and updating the latest version. I don’t see our rules in your htaccess file and the file does not look corrupted so I’m not sure off the bat why the 500 error is throwing.

    I have next error:
    Fatal error: Cannot redeclare lp_render_global_settings() (previously declared in E:\server\www\wordpress_test\php\wp-content\plugins\landing-pages\functions\functions.admin.php:469) in E:\server\www\wordpress_test\php\wp-content\plugins\landing-pages\modules\ on line 400


    Plugin Author David Wells


    Please delete and redownload the plugin. This should fix your issue

    Also, I see this error:
    Fatal error: Cannot redeclare tgmpa() (previously declared in E:\server\www\wordpress_test\php\wp-content\plugins\landing-pages\libraries\class-tgm-plugin-activation.php:975) in E:\server\www\wordpress_test\php\wp-content\themes\ready-themes\ready_ecommerce_theme\plugin-activation.php on line 831
    when trying to edit taxonomy.


    Plugin Author David Wells


    Our tgmpa() function is wrapped in a conditional

    if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {

    It should not be conflicting with your theme unless your theme is not conditionally checking if that class hasn’t already been defined.

    Can you look in that file E:\server\www\wordpress_test\php\wp-content\themes\ready-themes\ready_ecommerce_theme\plugin-activation.php and check?

    Yes, I already checked this issue and resolved. Thnx for responding. Strange only tone thing – that function tgmpa() is wraped into condition that you described, but no in if(!function_exists(‘tgmpa’))


Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Error 500 on plugin activation’ is closed to new replies.