Redirect problem in Wordpress

Asked

Viewed 7,832 times

2

After a change in the settings of the Wordpress admin panel, it was no longer possible to access any page other than the home page, the administrative panel itself and the appearance of the site menu was disfigured.

When I try to access any page other than the initial one a redirect happens and the URL is "duplicated".

Example:

Accessing: www.xxxxxxxxxxxx.com/wp-admin

Redirect to:

www.xxxxxxxxxxxx.com/wp-admin&redirect_to=http%3A%2F%2Fwww.xxxxxxxxx.com%2Fwp-admin%2Findex.php&reauth=1

How can I fix this?

  • This URL is natural to WP. This is how it sends you to the dashboard after authentication. If you can’t access the admin or the menu has become "disfigured", the problem is not this.

  • I’ve been using WP for a long time, and I’ve never seen that. The normal URL to access wp-admin is "site address/wp-admin" The person who messed with the settings said they were trying to change the home page, I believe they have created a permanent redirection to this page because it is the only one that can access

  • The URL is getting duplicated

  • in your "strange" url, change wp-admin&redirect_to for wp-login&redirect_to and see if you can log in. Or try to log in directly by seusite.com/wp-login.php

  • I can log in, but the panel won’t open, it always redirects to the home page.

  • You moved your wp place?

  • No. My boss changed some configuration, but he can’t tell exactly where it was. Is there any way to access settings other than through the panel?

Show 3 more comments

4 answers

3


As I said in the comments, this URL Wordpress is normal. When you enter wp-admin without being logged in, it sends you to the login page (wp-login) for you to enter your credentials, and return it to the admin panel. The way it does this is through these parameters in the URL. Turns out, in your case, she was acting strange.

That can happen (i.e., possible causes, not including all of them) by some incoherent change in permalinks - what I find unlikely - or the change of the physical location of Wordpress. In the latter case, this change should be made bearing in mind the fact that you are making a migration, whether to another server or to another folder. WP stores the Urls of the site in a database, and the simple cut and Paste folder will not persist this information, may trigger this type of problem.

For you to change the Urls, you have several options. I particularly stress the definition in wp-config.php, as follows:

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

Remember, after the change, you remove these lines. Otherwise, WP will reset the Urls every time the page is accessed, and this is unnecessary.

1

I had the same problem. It is possible to make the correction directly in the database.

On the table wp_options you need to change the column value site_url and also home to your domain address.

Most people forget to put the protocol http or https and ends up putting only dominio.com.br

To make the change, run the query:

UPDATE wp_options SET option_value = 'http://www.seudominio.com.br' WHERE option_name = 'home' OR option_name = 'siteurl';

1

I’ve had this problem a few times, and the cause can be varied from htacess to permissions error. I always follow a few steps to try to solve:

Step I:

Check if the website URL is correct in the database, you can find it in the table wp_options with option_name: siteurl (is usually the first field).

If the URL is different you can update it using that source of Github inserting the generated code into the field SQL of your data flock, or add the following code to the file wp-config.php:

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

and/or code below in the file functions.php:

update_option('siteurl', 'http://example.com');
update_option('home', 'http://example.com');

I usually use the source of github, but when using this second medium I use the two methods to force the exchange, you can check in more detail on Codex.

Step II:

If it is an htacess bug, you can resolve only by updating the site’s permanent link.

Try to access one of the internal "pages" of your administrative panel, such as plugins using this URL:

http://seusite.com.br/wp-admin/plugins.php

If you can access it, go to permanent link or options-permalink (if the language is English), and just update the form saving the changes. This will force your htacess be updated.

Step III:

If the previous steps have not worked, I suggest you move the site to the root if it is inside a subfolder for example "new" or "temp" and try to "re-join" the file .htacess.


In case none of the above works, check the file permission, for folder uses 0775 and for files 0644.

0

In case someone has done all the settings and still not solved, in my case I identified that the server was returning error 404 for the index file, so I entered the FTP and checked that the permissions of the files were only for reading, then I switched to read and record and finally it worked perfectly.

Follow the steps for those who don’t know how to do:

  1. Open the Zilla
  2. Access the hosting ftp
  3. Check the "Permissions" column if a file or directory has permissions like this: -r-r-r or something like that
  4. Select the files from the root folder (or the files that are with these permissions)
  5. Right-click and go to "File Permissions"
  6. Select Read and Run for owner, group and audience.

Note: This can be a measure that will affect the security of the site in a certain way, so it is important to evaluate this before changing permissions.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.