Title: PHP Warning WPACU_PREVENT_ANY_FRONTEND_OPTIMIZATION
Last modified: July 6, 2021

---

# PHP Warning WPACU_PREVENT_ANY_FRONTEND_OPTIMIZATION

 *  Resolved [Nazrinn](https://wordpress.org/support/users/nazrinn/)
 * (@nazrinn)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/)
 * I just updated the plugin to its latest version an I get the following error 
   message:
 * `Warning: Constant WPACU_PREVENT_ANY_FRONTEND_OPTIMIZATION already defined in
   C:\xampp\htdocs\dev\barbandcarole\wp-content\plugins\wp-asset-clean-up\classes\
   Plugin.php on line 437`
 * This appears multiple times per page on the front-end.
 * Any idea how to fix that? Or at least have a temporary workaround for the issue
   while you work on a fix.
    -  This topic was modified 4 years, 11 months ago by [Nazrinn](https://wordpress.org/support/users/nazrinn/).

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

 *  Plugin Author [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * (@gabelivan)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/#post-14629570)
 * [@nazrinn](https://wordpress.org/support/users/nazrinn/) my apologies for this
   inconvenience! Can you re-download the plugin? The notice should disappear! Also,
   this is likely showing on a staging/dev environment. A warning like these shouldn’t
   show on the live website (e.g. it’s likely you’re having WP_DEBUG turned on: 
   [https://wordpress.org/support/article/debugging-in-wordpress/](https://wordpress.org/support/article/debugging-in-wordpress/))
 *  Thread Starter [Nazrinn](https://wordpress.org/support/users/nazrinn/)
 * (@nazrinn)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/#post-14629573)
 * Will my settings be erased if I do that?
 *  Plugin Author [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * (@gabelivan)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/#post-14629597)
 * [@nazrinn](https://wordpress.org/support/users/nazrinn/) of course not as the
   settings are preserved in the database. You can even delete the plugin and install
   any version of it you need. Once you re-activate the plugin, the settings will
   be restored.
 *  Thread Starter [Nazrinn](https://wordpress.org/support/users/nazrinn/)
 * (@nazrinn)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/#post-14629937)
 * I did as indicated and now I’m getting [these 3 warnings](https://i.gyazo.com/fc8b366141b9cf64ff56b34dce55658a.png).
   These are definitely caused by WPACU, as the warnings go away when I deactivate
   the plugin.
 * This seems to happens only on the homepage, too.
    -  This reply was modified 4 years, 11 months ago by [Nazrinn](https://wordpress.org/support/users/nazrinn/).
 *  [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/#post-14630247)
 * I can confirm this warning is shown on sites with debug on:
 * `Warning: Constant WPACU_PREVENT_ANY_FRONTEND_OPTIMIZATION already defined in/
   home/oldrupdk/oldrup.net/wp-content/plugins/wp-asset-clean-up/classes/Plugin.
   php on line 437`
 * Warning introduced in version 1.3.8.0
 * Previous versions did not throw that warning.
 * Thank you for a great plugin! 🙂
    Bjarne
 *  Plugin Author [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * (@gabelivan)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/#post-14630841)
 * [@oldrup](https://wordpress.org/support/users/oldrup/) sorry about that! At least
   it doesn’t show on a live website (anyone should have switched off printing these
   warnings unless it’s a staging/dev website). If you delete the plugin and re-
   install it (all settings would be preserved), you should not have these warnings
   anymore!
 * [@nazrinn](https://wordpress.org/support/users/nazrinn/) are you sure the problem
   is from Asset CleanUp? The warnings seem unrelated to the plugin.
 *  [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/#post-14631648)
 * [@gabelivan](https://wordpress.org/support/users/gabelivan/) – no no, it’s not
   a production site per se. I have a live test site at [https://oldrup.net/asset-cleanup/](https://oldrup.net/asset-cleanup/)
   specifically for testing plugins with new WordPress and PHP versions – in this
   case WP 5.8 and PHP 8, and as such it makes sense to have debug on.
 * As the debug info is shown on the front, I have chosen to downgrade Asset Cleanup
   for now. All settings are retained, as you also pointed out.
 *  Plugin Author [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * (@gabelivan)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/#post-14632662)
 * [@oldrup](https://wordpress.org/support/users/oldrup/) I understand! Usually,
   notices are printing on dev/staging websites due to WP_DEBUG being turned ON.
   It’s recommended to have it turned OFF on live websites, but your situation is
   different. What you can do is delete the current version you’re using (Asset 
   CleanUp) and re-install it from WordPress.org. It should not print the same error
   as the tag was updated to have the bug fixed. Let me know how it goes!
 *  [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/#post-14639846)
 * Seems to be working perfectly now. Thank you 🙂
 *  [asaduzzamann](https://wordpress.org/support/users/asaduzzamann/)
 * (@asaduzzamann)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/#post-14685101)
 * Hi Bjarne Oldrup , How you resolved the problem. can you explain me.. Because,
   i am facing the same problem. Thank you.
 *  Plugin Author [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * (@gabelivan)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/#post-14685163)
 * [@asaduzzamann](https://wordpress.org/support/users/asaduzzamann/) delete the
   version you have on your website (no worries, all settings will be preserved)
   and re-install it from WordPress.org. It should fix the problem you’re having.
 *  [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/#post-14685164)
 * Hey [@asaduzzamann](https://wordpress.org/support/users/asaduzzamann/)
 * I uninstalled Asset Cleanup and re-installed from WordPress.org. That did it 
   for me I think.
 * Kind regards
    Bjarne
 *  [asaduzzamann](https://wordpress.org/support/users/asaduzzamann/)
 * (@asaduzzamann)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/#post-14685202)
 * Hi [@gabelivan](https://wordpress.org/support/users/gabelivan/), I’ve deleted
   and re-install the wpacu but still, there is no change. I was enabled wp debug
   by wp-debugging plugin and then I am facing this problem.
 * Note: wp-debugging disabled now by editing the wp-config.php file.
 * Now, what can be solution.
 * Thank you.
 *  Plugin Author [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * (@gabelivan)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/#post-14685248)
 * [@asaduzzamann](https://wordpress.org/support/users/asaduzzamann/) have you downloaded
   the plugin from the following link? [https://downloads.wordpress.org/plugin/wp-asset-clean-up.1.3.8.0.zip](https://downloads.wordpress.org/plugin/wp-asset-clean-up.1.3.8.0.zip)–
   the problem has been fixed for other users that re-downloaded the right ZIP file.
   Please re-check that and the time the errors get logged.

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

The topic ‘PHP Warning WPACU_PREVENT_ANY_FRONTEND_OPTIMIZATION’ is closed to new
replies.

 * ![](https://ps.w.org/wp-asset-clean-up/assets/icon-256x256.png?rev=1981952)
 * [Asset CleanUp: Page Speed Booster](https://wordpress.org/plugins/wp-asset-clean-up/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-asset-clean-up/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-asset-clean-up/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-asset-clean-up/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-asset-clean-up/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-asset-clean-up/reviews/)

 * 14 replies
 * 4 participants
 * Last reply from: [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/php-warning-wpacu_prevent_any_frontend_optimization/#post-14685248)
 * Status: resolved