How To Redesign with Oxygen Builder on a Live Site – without a Staging Site


Most advice I see on redesigning a live site with Oxygen is to create a completely separate staging site, as you would typically.

However Oxygen is quite unique. With Oxygen installed, the plugin overides not only the previous theme, but the content as well.  This means you can recreate your entire site with your new design and content on the same pages with Oxygen.

The way to do this is to enable Oxygen only for yourself for development (you will see Oxygen frontend and backend when logged in) and all logged out users will see the current version of the site and Oxygen will be completely invisible to them. This is done by uploading a php file (shown below). Then when you are ready to go live, simply remove that php file so that everyone sees the new version.

Please note that the standard way of redesigning a site with a staging site may be more appropriate in certain situations, such as if you are changing the plugins or functionality of your site. You will need to consider which is the best approach based on what changes you will be making.

Here is how to do it:

  1. Create a folder in your wp-content folder called mu-plugins
  2. Then in your mu-plugins folder create a php file called enable-oxygen-logged-in.php with this code below:
<?php
    add_filter( 'option_active_plugins', 'enable_oxygen_logged_in' );
        function enable_oxygen_logged_in( $plugins ) {
            require (ABSPATH . WPINC . '/pluggable.php');
            if ( !is_user_logged_in() ) {
            $plugins_not_needed = array ('oxygen/functions.php');
            foreach ( $plugins_not_needed as $plugin ) {
                $key = array_search( $plugin, $plugins );
                if ( false !== $key ) {
                   unset( $plugins[ $key ] );
                }
            }
        }
        return $plugins;
   }
?>

Thats it!  Please leave a comment below on your thoughts on this and if it worked for you.

13 Comments

  1. Sue

    Just did it – I’ll let you know how it works!

    Sue

    Reply
    • Sue

      It worked like a charm!

      Thanks,
      Sue

      Reply
      • Mastery Websites

        Great! Good to know this helped Sue.

        Reply
  2. Doug

    I created the PHP file in mu-plugins but it changes for the public side of the site not just for the one admin I placed in the file. On a tablet I checked the front end of the site and it showed the new oxygen rebuilding site not the original.

    Reply
    • Mastery Websites

      Hard to know why this is the case without taking a look.

      Reply
  3. Rebekah

    It allows non-logged-in users to view the old site normally, which is great. However, we are using Oxygen 1. We see the “Edit in visual Editor” button, but when we click it, none of the builder tools show and we are still getting the divi sidebar with no way to actually use Oxygen to build new pages.

    Reply
    • Mastery Websites

      Sounds like you are currently with Divi and want to setup your new site with Oxygen. I would recommend creating your new site with Oxygen 2, not Oxygen 1. See if that works.

      Reply
  4. VC

    I am trying this for on Oxygen 3.0 but its not working.

    Reply
    • Mastery Websites

      I made a fix, please copy that code and try again.

      Reply
    • Kathir

      Hey for the first time.i installed oxygen builder on my existing WordPress blog, suddenly my theme css broken and SEO plugin shows heading template has been changed..

      Will above solution fix it?

      Reply
      • Mastery Websites

        Yes it should.

        Reply
  5. Well Traveled Mile

    Hi, thanks for the tip! Everything worked, except that with Elementor installed the slug on the Oxygen editor screen shows:

    “https://welltraveledmile.com/?elementor_library=card-maximizer-header-footer&ct_builder=true”

    Is this an issue or will the elementor_library part be removed when I turn deactivate Elementor and delete the mu-plugin?

    Thanks!

    Reply
    • Mastery Websites

      I never did this with a Elementor site. Was it an issue in the end?

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *