Redirect problem in Wordpress

2

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

When I try to access any page other than the initial page 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.xxxxxxxxxxxx.com%2Fwp-admin%2Findex.php&reauth=1

How can I fix this?

    
asked by anonymous 11.11.2015 / 12:27

4 answers

3

As I said in the comments, this WordPress URL 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 returns you to the admin panel. The way it does this is through these parameters in URL . It turns out that, in your case, she was strange.

That can happen (ie, possible causes, not contemplating all of them) by some incoherent change in permalinks - which I find unlikely - or change the physical location of WordPress. In the latter case, this change should be made keeping in mind the fact that you are doing a migration , regardless of whether to another server or to another folder. WP stores the URLs of the site in database, and the simple cut and paste of the folder will not persist this information, which can trigger this type of problem. >

To change your URLs , you have multiple options . I particularly force the setting 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 rows. Otherwise, WP will reset the URLs every time the page is accessed, and that is unnecessary.

    
11.11.2015 / 13:31
1

I've had this problem a couple of times, and the cause can be varied, from htacess to permission error. I always take a few steps to try to solve:

Step I:

Make sure the site URL is correct in the database, you can find it in the wp_options table with option_name : siteurl ( usually the first field).

If the URL is different you can update it by using this from Github by entering code generated in the SQL field of your database, or add the following code in the wp-config.php file:

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

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

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

I usually use github's source, but when I use this second way I use both methods to force the exchange, you can look at Codex .

Step II:

If it is an htacess bug, you can solve it by just updating the permanent link on the site.

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

link

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

Step III:

If the previous steps did not work, I suggest that you move the site to the root if it is inside a sub-folder, for example "new" or "temp", and try to "reupload" the file. htacess .

If none of the above works, check the permission of the files, for folder 0775 and for files 0644.

    
11.11.2015 / 14:46
1

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

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

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

To make the change, execute the query:

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

In case someone made all the settings and still did not solve, in my case I identified that the server was returning error 404 to the index file, then I logged into FTP and verified that the permissions of the files were read-only, so I changed it to read and save, and it worked fine at last.

Follow the steps for those who do not know how to do it:

  • Open filezilla
  • Access the hosting ftp
  • Check the "Permissions" column if a file or directory has permissions like this: -r - r - r or something like
  • Select the root folder files (or files that have these permissions)
  • Right click and go to "File Permissions"
  • Select Read and Run for owner, group, and audience.
  • Note: This may be a measure that will affect site security in some way, so it is important to evaluate this before changing the permissions.     

    04.12.2018 / 16:36