Question

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.com/?w3tc_note=flush_all

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

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

In my wp-config.php

And with these google results: Redirecting to home-page when saving any edited code https://wordpress.org/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.

Was it helpful?

Solution 3

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 :)

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top