admin管理员组

文章数量:1336660

I migrated my site to a new server. Everything seems to be fine, but the browser is redirected to the frontpage when I save configurations in either the "W3 Total Cache" plugin or in "Duplicate post" plugin. It does save the edits, but it´s annoing with the redirect.

For example when I press purge all caches from W3 Cache, it is redirected to

www.mysite/?w3tc_note=flush_all

I can´t find a solution that solves it. I tried with:

define('WP_HOME','');
define('WP_SITEURL','');

In my wp-config.php

And with these google results: Redirecting to home-page when saving any edited code /

I also looked at the wp_options in the DB. But seems allright.

I tried to change the wp permanent link options in the admin settings too.

The "Duplicate post" plugin was installed after the site migration.

I migrated my site to a new server. Everything seems to be fine, but the browser is redirected to the frontpage when I save configurations in either the "W3 Total Cache" plugin or in "Duplicate post" plugin. It does save the edits, but it´s annoing with the redirect.

For example when I press purge all caches from W3 Cache, it is redirected to

www.mysite/?w3tc_note=flush_all

I can´t find a solution that solves it. I tried with:

define('WP_HOME','http://example');
define('WP_SITEURL','http://example');

In my wp-config.php

And with these google results: Redirecting to home-page when saving any edited code https://wordpress/support/topic/wordpress-5-0-beta3-redirects-to-wp-admin-edit-php-after-hitting-enter-key/

I also looked at the wp_options in the DB. But seems allright.

I tried to change the wp permanent link options in the admin settings too.

The "Duplicate post" plugin was installed after the site migration.

Share Improve this question edited Apr 5, 2019 at 10:32 Jonas Borneland asked Mar 7, 2019 at 12:26 Jonas BornelandJonas Borneland 1015 bronze badges
Add a comment  | 

3 Answers 3

Reset to default 2

It's because you have set the Referrer Policy header incorrectly set in the W3TC page cache.

Referrer Policy
This header restricts the values of the referer header in outbound links.
**Directive: same-origin**

...will fix it. If your overall Directive is "same-origin" and you set the Referrer header to something different (such as "origin"), this error will occur. I changed mine to same-origin and the problem was immediately fixed.

It is a bit hard to really know what is going on. But a best "guess" is that you have a plugin that is redirecting and/or conflicting with the theme. By process of elimination, I would deactivate all the plugins and see if the problem still exists. If it disappears, reactivate, one by one. Somewhere there is a conflict and doing a redirect.

A secondary effort would be, after all the plugins have been disabled and assuming it still exists, then change themes.

You have to narrow this down to the most basic element.

Okay, I found a solution. To anyone in the future having this problem here's what i did:

  • I used the plugin "Duplicator" and made a package of the site.
  • Then i downloaded the installer and the archive.
  • I then deleted everything in the database and on the ftp.
  • Then I transfered the archive and installer file to the FTP and run the installer.php

Now everything works again :)

本文标签: migrationW3 Cache redirects to front page when I press purge all caches