Turn off caching and optimize plugins during development

Recently I saw a lot of questions/requests like “Can’t edit”, “Not saving” etc.

Please keep in mind to turn off during development every plugin that caches or optimizes your site or database. Security plugins as well. The best way to develop / maintain a WordPress site (with or without Beaver Builder) is to develop and change in a local environment (for this purpose DesktopServer is a good solution) and deploy to a staging environment (can also be done with DesktopServer). Test it there and finally deploy to the live environment. If you want a more or less automatic process you can use BackupBuddy.

You should never (really never) work on the live site. But you could skip the local part though and work on the staging site with above mentioned plugins turned off.

Hope this helps,
Leo

Hey Leo,

Thanks for creating this thread. Will definitely be useful for those cases! :slight_smile:

Ben

Is it possible to disable Beaver Builder caching during development?

Hey Carrie!

That’s not currently possible, but the thought has crossed my mind as well. We do need to store CSS/JS in files, but what I’ve thought about doing is setting some sort of constant in wp-config (e.g. BB_DEV or we could piggyback WP_DEBUG) that would cause the cached files to be un-minified and re-rendered on each page load. Does that sound like something that would work for you?

Justin

Hey Justin,
That would be awesome assuming the performance hit from this solution is less than the time it takes to hit that Clear Cache button! :slight_smile:

Cheers,
Carrie

Great! I’m a bit behind with the holidays but will look to get something out soon. In the meantime, I’ve given out this code in the past and I believe it does the trick as well…

function refresh_bb_cache() {
  if ( FLBuilderModel::is_builder_enabled() ) {
     FLBuilder::render_js();
     FLBuilder::render_css();
  }
}
add_action( 'wp', 'refresh_bb_cache' );

Justin

Hey Carrie,

To follow up on this, when 1.7 officially drops, caching will be disabled when WP_DEBUG is set to true. I hope that helps!

Justin

Justin, that’s awesome - thank you!