Title: Safe Mode Loop
Last modified: May 10, 2023

---

# Safe Mode Loop

 *  Resolved [onurparlar](https://wordpress.org/support/users/onurparlar/)
 * (@onurparlar)
 * [3 years ago](https://wordpress.org/support/topic/safe-mode-loop/)
 * Hello,
 * After latest update I’m getting same error all the time.
 * Jetpack trying to turn “Safe Mode State” I’m tried everything.
 * I tried move jetpack data I tried create fresh connection…
 * Non of them didn’t solve this loop.
 * I tried wp-config changes but cause of site setup that act broken my site.
 * Do you have any solution for that?
 * Thank you
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsafe-mode-loop%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [JS (a11n)](https://wordpress.org/support/users/julesomattic/)
 * (@julesomattic)
 * [3 years ago](https://wordpress.org/support/topic/safe-mode-loop/#post-16738763)
 * [@onurparlar](https://wordpress.org/support/users/onurparlar/) Has Jetpack ever
   been connected to a staging or duplicate/similar site with a different URL? If
   so, what is that other URL?
 *  Thread Starter [onurparlar](https://wordpress.org/support/users/onurparlar/)
 * (@onurparlar)
 * [3 years ago](https://wordpress.org/support/topic/safe-mode-loop/#post-16739008)
 * [@julesomattic](https://wordpress.org/support/users/julesomattic/) always asking:
 * mail.sanalsergi.com & sanalsergi.com to merge or change status…
 *  Plugin Support [lastsplash (a11n)](https://wordpress.org/support/users/lastsplash/)
 * (@lastsplash)
 * [3 years ago](https://wordpress.org/support/topic/safe-mode-loop/#post-16751825)
 * Hi [@onurparlar](https://wordpress.org/support/users/onurparlar/) –
 * Hi there –
 * Looking at our logs, it looks like the URL is switching between the `www` and`
   mail` version of your domain:
 * > IDC detected (home|siteurl) WPCOM: (sanalsergi.com/|sanalsergi.com/) Remote:(
   > sanalsergi.com/|mail.sanalsergi.com/). Sync failed because synced URLs do not
   > match WPCOM or production Jetpack site.
 * There are certain website configurations, most commonly encountered on Bitnami
   sites, which will cause problems with Jetpack’s ability to correctly determine
   your site URL. This can break your site’s connection to Jetpack.
 * To determine if this applies to you, check your `wp-config.php` file for the 
   presence of this code:
 * `define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/'); define('WP_HOME','
   http://' . $_SERVER['HTTP_HOST'] . '/');`
 * If that code is present, you’ll want to remove it and replace it with this code
   instead:
 * `define('WP_SITEURL', 'https://example.com'); define('WP_HOME', 'https://example.
   com');`
 * Be sure to swap out the example domain with your site’s actual domain.
 * Before making these changes, you will want to back up your site so that you can
   restore it in case you have issues. If you don’t have a backup solution, I’d 
   encourage you to [check out Jetpack VaultPress Backup](https://jetpack.com/upgrade/backup/).
 * Let us know if you continue to have issues.
 *  Thread Starter [onurparlar](https://wordpress.org/support/users/onurparlar/)
 * (@onurparlar)
 * [3 years ago](https://wordpress.org/support/topic/safe-mode-loop/#post-16752671)
 * [@lastsplash](https://wordpress.org/support/users/lastsplash/)
 * As was I explain my first post, that code is broken my website.
 * That’s why this solution is out of possibilities.
 * The thing is I don’t have that error before…
 * Any other idea to fix that?
 * btw that happening sometimes…
 *  Plugin Contributor [Dan (a11n)](https://wordpress.org/support/users/drawmyface/)
 * (@drawmyface)
 * [3 years ago](https://wordpress.org/support/topic/safe-mode-loop/#post-16771050)
 * Hi [@onurparlar](https://wordpress.org/support/users/onurparlar/)
 * It’s strange that replacing the code as described above would break your site.
   How did it break exactly?
 * You mentioned “cause of site setup that act broken my site”
 * What is the site setup you’re referring to? Do you have some kind of non-standard
   URL configuration or something?
 *  Thread Starter [onurparlar](https://wordpress.org/support/users/onurparlar/)
 * (@onurparlar)
 * [3 years ago](https://wordpress.org/support/topic/safe-mode-loop/#post-16771704)
 * [@drawmyface](https://wordpress.org/support/users/drawmyface/) thank you for 
   answer
 * I’m sharing with you my wp-config.php
 *     ```wp-block-code
       <?php
       define( 'WP_CACHE', true );
   
       if ( file_exists(ABSPATH . "wp-content/advanced-headers.php") ) { 
       	require_once ABSPATH . "wp-content/advanced-headers.php";
       }
       //Enable error logging.
       @ini_set('log_errors', 'On');
       @ini_set('error_log', '/home/sanalser/public_html/icerik/elm-error-logs/php-errors.log');
       //Don't show errors to site visitors.
       @ini_set('display_errors', 'Off');
       if ( !defined('WP_DEBUG_DISPLAY') ) {
       	define('WP_DEBUG_DISPLAY', false);
       }
       define( 'WP_MEMORY_LIMIT', '256M' );
       /* Compress All CSS Files */
       define( 'COMPRESS_CSS',        true );
       /* Compress All JS Files */
       define( 'COMPRESS_SCRIPTS',    true );
       /* Turn On GZIP Compression */
       define( 'ENFORCE_GZIP',        true );
       /**
        * The base configuration for WordPress
        *
        * The wp-config.php creation script uses this file during the
        * installation. You don't have to use the web site, you can
        * copy this file to "wp-config.php" and fill in the values.
        *
        * This file contains the following configurations:
        *
        * * MySQL settings
        * * Secret keys
        * * Database table prefix
        * * ABSPATH
        *
        * @link https://codex.wordpress.org/Editing_wp-config.php
        *
        * @package WordPress
        */
   
       define('DISALLOW_FILE_EDIT',1);
       /* That's all, stop editing! Happy blogging. */
       /** Absolute path to the WordPress directory. */
       if ( !defined('ABSPATH') )
       	define('ABSPATH', dirname(__FILE__) . '/');
       /** Sets up WordPress vars and included files. */
       //Rename wp-content folder
       define ('WP_CONTENT_FOLDERNAME', 'icerik');
       //Define new directory path
       define ('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME);
       //Change Uploads folder name
       //Define new directory URL
       define('WP_SITEURL','https://' . $_SERVER['HTTP_HOST'] . '/');
       define('WP_CONTENT_URL', WP_SITEURL . WP_CONTENT_FOLDERNAME);
       require_once(ABSPATH . 'wp-settings.php');
       @ini_set('session.cookie_httponly', true); 
       @ini_set('session.cookie_secure', true); 
       @ini_set('session.use_only_cookies', true);
       /**
       /**
        * Set port to 443
        */
       $_SERVER['SERVER_PORT'] = 443;
       ```
   
 * I deleted some parts for security reasons.
 *  Plugin Support [Animesh Gaurav](https://wordpress.org/support/users/bizanimesh/)
 * (@bizanimesh)
 * [3 years ago](https://wordpress.org/support/topic/safe-mode-loop/#post-16788546)
 * Hey [@onurparlar](https://wordpress.org/support/users/onurparlar/) – just want
   to confirm have you edited the `wp-config.php` file in the past? Because I can
   see some issues in the file. For example:
    1. Near the end of the code snippet, there is an opening comment tag `/**`, but
       there is no corresponding closing comment tag `*/`. This can result in a PHP
       syntax error if there is code following the incomplete comment.
    2. Just before the incomplete comment, there is a duplicated opening comment tag`/**`.
       It appears to be a duplication or unintended repetition of the comment.
 * Could you please confirm if they are got edited only when you shared them or 
   are they looking the same in the `wp-config.php` file also?
 * If they are different in `wp-config.php` file then I would recommend first reinstalling
   the WordPress to make sure we have no issues with `wp-config.php` file.
 * Other than this, I have made a small change for your site on our side and disconnected
   the Jetpack plugin, could you please try to [reconnect the Jetpack](https://jetpack.com/support/reconnecting-reinstalling-jetpack/#reconnecting-jetpack)
   to your side again?
 *  Thread Starter [onurparlar](https://wordpress.org/support/users/onurparlar/)
 * (@onurparlar)
 * [3 years ago](https://wordpress.org/support/topic/safe-mode-loop/#post-16788991)
 * Hi [@bizanimesh](https://wordpress.org/support/users/bizanimesh/),
 * I cleaned all */ /** things from wp-config file to be sure and I changed this
   sections “`define('WP_SITEURL', 'https://example.com'); define('WP_HOME', 'https://
   example.com');`“
 * I’m sharing screenshots to show what is happening.
 * ![](https://i0.wp.com/www.sanalsergi.com/problems/001.png?ssl=1)
 * ![](https://i0.wp.com/www.sanalsergi.com/problems/002.png?ssl=1)
 * ![](https://i0.wp.com/www.sanalsergi.com/problems/003.png?ssl=1)
 * I just switched back to old version of wp-config file Jetpack asked me to “install
   again” I’ve installed back. These are the problems when I define site url inside
   wp-config file.
 *  Plugin Support [Animesh Gaurav](https://wordpress.org/support/users/bizanimesh/)
 * (@bizanimesh)
 * [3 years ago](https://wordpress.org/support/topic/safe-mode-loop/#post-16790586)
 * Hey [@onurparlar](https://wordpress.org/support/users/onurparlar/) – thanks for
   sharing the screenshot – it appears there is something installed on your site
   that is creating the issue for the issue. The first thing I noticed is the [top bar that appears for your site](https://i.imgur.com/wbE2MVs.jpg)
   is modified, and it doesn’t appear to be the default WordPress one.
 * Could you please once troubleshoot what is creating an issue for the site? As
   a first step, I recommend you troubleshoot using Health Check & Troubleshooting
   plugin and make sure all plugins are deactivated except Jetpack + switch the 
   site to the default WP theme like [Twenty Twenty Two](https://wordpress.org/themes/twentytwentytwo/);
   you can [follow the steps here](https://jetpack.com/support/troubleshooting-plugin-and-theme-conflicts/#health-check).
 * If troubleshooting using Health Check & Troubleshooting plugin doesn’t help, 
   then you can try [manual troubleshooting](https://jetpack.com/support/troubleshooting-plugin-and-theme-conflicts/#troubleshooting-manually)
   but again, make sure all plugins are deactivated except Jetpack + switch the 
   site to the default WP theme like Twenty Twenty Two.
 *  Thread Starter [onurparlar](https://wordpress.org/support/users/onurparlar/)
 * (@onurparlar)
 * [3 years ago](https://wordpress.org/support/topic/safe-mode-loop/#post-16791592)
 * Ok I’ll try and then let you know the results.
 * Thank you [@bizanimesh](https://wordpress.org/support/users/bizanimesh/)
 *  Thread Starter [onurparlar](https://wordpress.org/support/users/onurparlar/)
 * (@onurparlar)
 * [3 years ago](https://wordpress.org/support/topic/safe-mode-loop/#post-16791595)
 * Hello again [@bizanimesh](https://wordpress.org/support/users/bizanimesh/)
 * The thing is I have that every site I have… I didn’t change any special thing
   🙁
 *  Plugin Support [Animesh Gaurav](https://wordpress.org/support/users/bizanimesh/)
 * (@bizanimesh)
 * [3 years ago](https://wordpress.org/support/topic/safe-mode-loop/#post-16799648)
 * Hey [@onurparlar](https://wordpress.org/support/users/onurparlar/) – do you mean
   the [top bar that appears for your site](https://i.imgur.com/wbE2MVs.jpg) is 
   available on your other site as well? If that is the case then it means it is
   applied by your hosting provider. Are you sure there is no plugins installed 
   on your site that is changing that?
 * Have you tried to troubleshoot using the process I have provided above?
 *  Plugin Contributor [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * (@erania-pinnera)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/safe-mode-loop/#post-16826137)
 * Hey [@onurparlar](https://wordpress.org/support/users/onurparlar/),
 * It’s been one week since this topic was last updated. I’m going to mark this 
   thread as solved. If you have any further questions or need more help, you’re
   welcome to open another thread here. Cheers!

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

The topic ‘Safe Mode Loop’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

## Tags

 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * 13 replies
 * 6 participants
 * Last reply from: [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/safe-mode-loop/#post-16826137)
 * Status: resolved