$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>Missing domain http:.wp-… in redirects|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Missing domain http:.wp-… in redirects

matteradmin10PV0评论

I am migrating my WP website from staging to production and I have a problem with Dashboard access.

When I try to access

http://<domain>/wp-admin.php

it redirects me to

http://./wp-login.php?redirect_to=http%3A%2F%2F<domain>%2Fwp-admin%2F&reauth=1

I can login with going directly to http://<domain>/wp-login.php and I can go to any Dashboard page but cannot change anything (with Save button) without redirecting to http://./wp-admin/….

For example, if I want to change post content,

  1. I do it and hit Save button.
  2. Then I redirects to http://./wp-admin/post.php?post=20&action=edit&message=1.
  3. Then I go back and see that post changes are saved.

The same problem is with changing Permalinks settings.

So what is broken: there is a dot . instead of my domain in redirect URIs.

Maybe it is because of cyrillic одиссейдом.рф domain?

Have I add some rewrite rules to fix it?


UPD:

I saved a page, go back, save again and there is no problem.

Then I tried to change site title in Settings/General and there is no problem too.

Then I tried to turn off Emoticons in Settings/Writing and there is no problem.

But activating/deactivating a plugin goes with problem.

I have no idea, my friends.

I am migrating my WP website from staging to production and I have a problem with Dashboard access.

When I try to access

http://<domain>/wp-admin.php

it redirects me to

http://./wp-login.php?redirect_to=http%3A%2F%2F<domain>%2Fwp-admin%2F&reauth=1

I can login with going directly to http://<domain>/wp-login.php and I can go to any Dashboard page but cannot change anything (with Save button) without redirecting to http://./wp-admin/….

For example, if I want to change post content,

  1. I do it and hit Save button.
  2. Then I redirects to http://./wp-admin/post.php?post=20&action=edit&message=1.
  3. Then I go back and see that post changes are saved.

The same problem is with changing Permalinks settings.

So what is broken: there is a dot . instead of my domain in redirect URIs.

Maybe it is because of cyrillic одиссейдом.рф domain?

Have I add some rewrite rules to fix it?


UPD:

I saved a page, go back, save again and there is no problem.

Then I tried to change site title in Settings/General and there is no problem too.

Then I tried to turn off Emoticons in Settings/Writing and there is no problem.

But activating/deactivating a plugin goes with problem.

I have no idea, my friends.

Share Improve this question edited Dec 30, 2014 at 6:02 Даниил Пронин asked Dec 29, 2014 at 8:41 Даниил ПронинДаниил Пронин 558 bronze badges 2
  • How do you migrating your website? I use this plugin and it works without problems at all. wordpress/plugins/duplicator – Nikolai Commented Jan 23, 2015 at 8:17
  • I migrated with WP Migrate DB wordpress/plugins/wp-migrate-db – Даниил Пронин Commented Jan 23, 2015 at 8:21
Add a comment  | 

4 Answers 4

Reset to default 1 +50

Possible solution: * go to permalinks under settings and check URL structure with your desired domain name. Even if the URL seems to be right, click the desired structure and save. This was handy while i migrated 2 websites. or * look for "wp_options" table in your database. You will find "siteurl" & "baseurl" row. Check if they are the right one.

Optional: search the whole database for the right URL.

I advise you to:

  1. Go to /wp-admin/options-general.php and see if your site urls are correct. If it works change them or edit them in the database manually;
  2. Delete your .htaccess file or replace it with a default one;
  3. You can also add the following lines of code to the wp-config.php file:

    Define('WP_SITEURL','http://your-site-url');

    Define('WP_HOME','http://your-site-url');

Can you access :

http://example/wp-admin/options-permalink.php

If you can try to change the option and reselect the same one and save

I had same issue for me even admin as not loading, My db had correct site url and home.

The solution which worked for me is, adding following lines in wp-config:

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

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far