-
Valerrr
Hello, I installed GP PRO + GB PRO on a brand-new website. When I try to activate it, I get the following message: License Key
403 Forbidden. Your server is unable to communicate with generatepress.com to activate your license key.I even (reluctantly) added this PHP code, but it didn’t help. It would be perfect if it worked without the PHP and that extra, unnecessary plugin.
add_filter( 'pre_http_request', function( $pre, $args, $url ) { // Check for GeneratePress URLs if ( 'https://generatepress.com' === $url || 'https://generatepress.com/' === $url ) { return wp_remote_post( 'https://api.generatepress.com', array( 'timeout' => $args['timeout'], 'sslverify' => $args['sslverify'], 'body' => $args['body'], ) ); } // Check for GenerateBlocks URLs if ( 'https://generateblocks.com' === $url || 'https://generateblocks.com/' === $url ) { return wp_remote_post( 'https://api.generateblocks.com', array( 'timeout' => $args['timeout'], 'sslverify' => $args['sslverify'], 'body' => $args['body'], ) ); } return $pre; }, 10, 3 ); -
George
Hi there,
The 403 error means something on your server (or between your server and ours) is blocking the license activation request.
Since you’ve already tried the secondary API snippet without success, here are the next steps to narrow it down:
- Firewall / security plugin — If you’re running a security plugin (Wordfence, Sucuri, etc.), try temporarily deactivating it and activating the license key again. The same applies to any server-level firewall — your host can check whether outgoing requests to
generatepress.comorapi.generatepress.comare being blocked. - Cloudflare — If your domain is behind Cloudflare, try switching it to DNS-only mode temporarily and retrying the activation. If that works, the Cloudflare firewall is the culprit — you’d need to allowlist our IP:
162.159.135.42. - Ask your host — Some hosts block outgoing HTTP requests by default or run mod_security rules that interfere. Ask them to check whether your server can reach
https://generatepress.comandhttps://api.generatepress.com, and to whitelist those if necessary. - Debug log — If none of the above helps, could you enable
WP_DEBUGandWP_DEBUG_LOGin yourwp-config.php, then add this snippet temporarily as a mu-plugin or in your child theme’sfunctions.php:
add_action( 'http_api_debug', function( $response, $context, $class, $r, $url ) { if ( 'https://generatepress.com' !== $url && 'https://api.generatepress.com' !== $url ) { return; } error_log( '------ Start GeneratePress license key debugging ------' ); error_log( '--- HTTP response or WP_Error object. ---' ); error_log( print_r( $response, true ) ); error_log( '--- HTTP transport used. ---' ); error_log( $class ); error_log( '--- HTTP request arguments. ---' ); error_log( print_r( $r, true ) ); }, 10, 5 );Then try activating the key again and share the contents of
wp-content/debug.logwith us. That will tell us exactly where the request is failing.You can safely remove the
pre_http_requestsnippet in the meantime — it won’t help if the underlying connection is being blocked. - Firewall / security plugin — If you’re running a security plugin (Wordfence, Sucuri, etc.), try temporarily deactivating it and activating the license key again. The same applies to any server-level firewall — your host can check whether outgoing requests to
- You must be logged in to reply to this topic.