Title: BPS Setup Wizard is not adding WP Super Cache custom code
Last modified: February 3, 2022

---

# BPS Setup Wizard is not adding WP Super Cache custom code

 *  Resolved [johnrsd](https://wordpress.org/support/users/johnrsd/)
 * (@johnrsd)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/bps-setup-wizard-is-not-adding-wp-super-cache-custom-code/)
 * Hi all,
 * I’m building a site for a client and I can’t seem to get rid of this BPS alert:
   **“
   WP Super Cache (WPSC) Plugin htaccess code was not found in BPS Custom Code”**
 * It instructs me to unlock the .htaccess file, save my WP Super Cache settings,
   and run the BPS Setup Wizard. I follow the instructions and am still greeted 
   with the alert. I can’t seem to find any instructions on how to manually add 
   the code into the BPS Custom Code/.htaccess, and I can’t figure out if I’m missing
   a setting somewhere or what.
 * Incidentally, I’m also experiencing regular temporary crashes. The site will 
   crash and will generally resolve itself after a simple refresh. I’m not sure 
   if the crashes are related or if that’s something else entirely but I figured
   I would add that in as an extra bit of information. I’ve already checked to see
   if any plugins were to blame but I haven’t found a trouble maker yet. I haven’t
   had this issue with BPS or WPSC previously so I’m fairly confused.
 * Site/server info as follows:
    Server: Apache PHP 7.4.27 MySQL 5.5.5 WP 5.9 Avada
   7.6.1
 * Thanks!
    JohnRSD
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fbps-setup-wizard-is-not-adding-wp-super-cache-custom-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/bps-setup-wizard-is-not-adding-wp-super-cache-custom-code/#post-15325670)
 * I checked your site and you have an nginx server. nginx servers do not process
   htaccess code. WP Super Cache will detect that you have an nginx server and not
   create htaccess Browser caching code. So to make the BPS alert go away do these
   steps. I’ll automate this fix in the next BPS version.
 * 1. Copy the WPSC placeholder text below into this BPS Root Custom Code text box:
   1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE
    2. Click the Save Root Custom
   Code button.
 *     ```
       # BEGIN WPSuperCache
       # END WPSuperCache
       ```
   
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/bps-setup-wizard-is-not-adding-wp-super-cache-custom-code/#post-15325715)
 * Hmm actually I have already added that nginx conditional code in the current 
   BPS version. Do you have the most current version of BPS installed? If you have
   the most current version of BPS installed then your server is not processing 
   this php code below correctly. Intermittent website/server crashes could indicate
   that there is a problem with your PHP build/compile/installation. Try switching
   to another PHP version in your web host control panel. Example: If you are currently
   using PHP 7.0 then switch to PHP 7.4, etc.
 *     ```
       if ( substr( esc_html( $_SERVER['SERVER_SOFTWARE'] ), 0, 5 ) == 'nginx' ) {		
       	return;
       }
       ```
   
    -  This reply was modified 4 years, 3 months ago by [AITpro](https://wordpress.org/support/users/aitpro/).
    -  This reply was modified 4 years, 3 months ago by [AITpro](https://wordpress.org/support/users/aitpro/).
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/bps-setup-wizard-is-not-adding-wp-super-cache-custom-code/#post-15325735)
 * Go to the BPS System Info page and copy and paste this info below. Maybe you 
   have a frontend nginx proxy and apache backend server? When I checked your site
   using Built With it shows nginx as your web server.
 * Server Type: Apache
    Operating System: Linux WP Filesystem API Method: direct
   Server API: litespeed CGI Host Server Type
 *  Thread Starter [johnrsd](https://wordpress.org/support/users/johnrsd/)
 * (@johnrsd)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/bps-setup-wizard-is-not-adding-wp-super-cache-custom-code/#post-15325774)
 * Thank you for the quick response!
 * I have an nginx plugin currently active, so that’s likely the issue. I will try
   deactivating that and changing the PHP version before pasting the BPS code you
   gave earlier.
 * BPS Version is 5.7
 * Here is the c/p you asked for:
    Server Type: Apache Operating System: Linux WP
   Filesystem API Method: direct Server API: fpm-fcgi CGI Host Server Type
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/bps-setup-wizard-is-not-adding-wp-super-cache-custom-code/#post-15325803)
 * What is the name of the nginx plugin? I checked your web host and they do use
   nginx and apache together. htaccess code does work on your web host. So maybe
   WPSC thinks you have a pure nginx web server and is not creating htaccess Browser
   caching code automatically? Check your WPSC option settings to see if Browser
   caching is enabled/turned on or not.
 * > Those of you familiar with .htaccess files and how they work with Apache will
   > note an important difference: Nginx does not recognize .htaccess files. Configurations
   > must be made in the server by an experienced system administrator.
   > This effectively breaks the WordPress “Pretty Permalinks” feature. Furthermore,
   > many of our advanced users rely upon .htaccess to complete all kind of tasks.(
   > Though, we should note, for most users, using a reliable plugin is better than
   > editing .htaccess directly.)
   > In order to get around this, we use Apache as the main web server and Nginx
   > as a proxy. This means that when a request for a page comes, Nginx first checks
   > to see the if the page being requested has been cached. If that page has been
   > cached then Nginx will serve the cached version. This increases page load speed
   > dramatically because neither PHP nor MySQL are required to generate that page.
    -  This reply was modified 4 years, 3 months ago by [AITpro](https://wordpress.org/support/users/aitpro/).
    -  This reply was modified 4 years, 3 months ago by [AITpro](https://wordpress.org/support/users/aitpro/).
    -  This reply was modified 4 years, 3 months ago by [AITpro](https://wordpress.org/support/users/aitpro/).
 *  Thread Starter [johnrsd](https://wordpress.org/support/users/johnrsd/)
 * (@johnrsd)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/bps-setup-wizard-is-not-adding-wp-super-cache-custom-code/#post-15325805)
 * It looks like the combination of all of the above was able to do the trick! I
   haven’t experienced a crash during this whole process so I’m assuming that was
   fixed with the PHP refresh. At this point, if the crashes continue I will likely
   just call my host and have them deal with it.
 * Thank you for your help!
 *  Thread Starter [johnrsd](https://wordpress.org/support/users/johnrsd/)
 * (@johnrsd)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/bps-setup-wizard-is-not-adding-wp-super-cache-custom-code/#post-15326103)
 * The nginx plugin I had is called [Nginx Helper by rtCamp](https://wordpress.org/plugins/nginx-helper/).
 * I just reactivated the Nginx Helper plugin and haven’t had any issues yet. I 
   did have caching enabled previously but I just allowed 304 browser caching as
   that has been disabled this entire time.
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/bps-setup-wizard-is-not-adding-wp-super-cache-custom-code/#post-15326274)
 * It looks like the Nginx Helper plugin is only for pure nginx servers and not 
   for an nginx frontend proxy and apache backend server, but I could be wrong. 
   I checked the FAQ and the GitHub help info, but there is not explicit info saying
   whether or not this plugin will work on your type of config.
    -  This reply was modified 4 years, 3 months ago by [AITpro](https://wordpress.org/support/users/aitpro/).
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/bps-setup-wizard-is-not-adding-wp-super-cache-custom-code/#post-15326290)
 * Your host has a help article about the Nginx Helper plugin. So yep it does work
   on your type of config. Do a search using your web host’s name + Nginx Helper.

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

The topic ‘BPS Setup Wizard is not adding WP Super Cache custom code’ is closed 
to new replies.

 * ![](https://ps.w.org/bulletproof-security/assets/icon-128x128.png?rev=1731938)
 * [BulletProof Security](https://wordpress.org/plugins/bulletproof-security/)
 * [Support Threads](https://wordpress.org/support/plugin/bulletproof-security/)
 * [Active Topics](https://wordpress.org/support/plugin/bulletproof-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bulletproof-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bulletproof-security/reviews/)

## Tags

 * [caching](https://wordpress.org/support/topic-tag/caching/)
 * [Crashes](https://wordpress.org/support/topic-tag/crashes/)
 * [crashing](https://wordpress.org/support/topic-tag/crashing/)
 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)
 * [setup wizard](https://wordpress.org/support/topic-tag/setup-wizard/)

 * 9 replies
 * 2 participants
 * Last reply from: [AITpro](https://wordpress.org/support/users/aitpro/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/bps-setup-wizard-is-not-adding-wp-super-cache-custom-code/#post-15326290)
 * Status: resolved