La pagina di login di WordPress continua a essere aggiornata e reindirizzata quando si cerca di accedere al proprio sito web?
Questo problema vi blocca dall’area di amministrazione di WordPress, impedendovi di lavorare sul vostro sito web.
In questo articolo vi mostreremo come risolvere il problema del refresh e del reindirizzamento della pagina di login di WordPress.
Cosa causa il problema di aggiornamento e reindirizzamento della pagina di login in WordPress?
L’errore di ricarica della pagina di accesso di WordPress è solitamente causato da impostazioni errate dell’URL di WordPress o dalla mancata impostazione dei cookie di accesso.
Normalmente, quando si accede, WordPress convalida il nome utente e la password e poi imposta un cookie di accesso nel browser. Successivamente, l’utente viene reindirizzato alla dashboard di WordPress.
Se WordPress non riesce a impostare correttamente il cookie di accesso o l’URL dell’area di amministrazione di WordPress non è corretto, si verrà reindirizzati alla schermata di accesso anziché alla dashboard di amministrazione.
I problemi di accesso possono essere causati anche da diversi errori di WordPress, come l’errore di connessione al database, l’errore interno del server o la schermata bianca della morte.
Con queste premesse, cerchiamo di risolvere il problema del reindirizzamento e dell’aggiornamento della pagina di login di WordPress. Potete utilizzare questi collegamenti rapidi per passare a un metodo specifico:
Nota: se volete provare i passaggi avanzati di questo tutorial su WordPress, create prima un backup del vostro sito. Consultate la nostra guida su come creare manualmente un backup del database di WordPress.
Video tutorial
Se non vi piace il video o preferite la versione scritta, continuate a leggere.
Metodo 1: Cancellare i cookie per risolvere i problemi di accesso
WordPress utilizza i cookie per l’autenticazione del login, quindi il primo passo per risolvere i problemi di login di WordPress è il più semplice. È necessario cancellare i cookie e la cache del browser.
In Google Chrome, è sufficiente fare clic sul menu delle impostazioni del browser e poi selezionare Altri strumenti ” Cancella dati di navigazione.
Si aprirà la pagina delle impostazioni di Chrome con un popup “Cancella dati di navigazione” visualizzato sullo schermo.
Da qui è necessario selezionare le opzioni “Cancella cookie e altri dati del sito” e “Immagini e file nella cache”.
Quindi, fate clic sul pulsante “Cancella dati” e Google Chrome cancellerà la cache del browser.
Assicuratevi inoltre che il vostro browser abbia i cookie abilitati. Dopo aver fatto ciò, riavviare il browser e provare ad accedere. Questo dovrebbe risolvere il problema per la maggior parte delle persone.
Abbiamo una guida completa con schermate che mostrano come cancellare la cache e i cookie in tutti i principali browser.
Metodo 2: Aggiornare le impostazioni degli URL di WordPress
WordPress è dotato di impostazioni per l’URL del vostro sito web e per l’URL della vostra installazione di WordPress.
Se si ha accesso all’area di amministrazione di WordPress, si può vedere questa opzione nella pagina Impostazioni ” Generale”.
Se questi URL non sono corretti, WordPress vi reindirizzerà alla pagina di accesso.
Poiché non è possibile accedere all’area di amministrazione di WordPress, è necessario modificare il file wp-config.php per risolvere il problema.
Il file wp-config.php è un file speciale di WordPress che contiene le impostazioni importanti di WordPress. Potete accedervi utilizzando un client FTP o tramite l’applicazione File Manager nella dashboard del vostro account di hosting WordPress.
Il file wp-config.php si trova nella cartella principale del sito. Basta modificare il file e incollare le seguenti righe di codice appena prima di quella che dice: "È tutto, smettete di modificare! Buona pubblicazione"
.
define('WP_HOME','https://www.example.com');
define('WP_SITEURL','https://www.example.com');
Non dimenticate di sostituire “example.com” con il vostro nome di dominio.
Quindi, salvare le modifiche e caricare il file sul proprio sito web.
Ora potete visitare il vostro sito web WordPress e provare ad accedere. Si spera che questo abbia risolto il problema. Se così non fosse, continuate a leggere per ulteriori passaggi di risoluzione dei problemi.
Metodo 3: Eliminare il file .htaccess in WordPress
A volte, il file .htaccess può essere danneggiato, causando errori interni al server o l’errore di aggiornamento della pagina di login.
È sufficiente accedere al vostro sito web utilizzando un client FTP o tramite l’applicazione File Manager nella dashboard del vostro provider di hosting.
Una volta collegati, individuare il file .htaccess nella directory principale del sito web e scaricarlo sul computer come backup.
Se non riuscite a trovare il vostro file .htaccess, questa guida sul perché il vostro file .htaccess potrebbe essere mancante può aiutarvi.
Dopodiché, cancellate il file .htaccess dal vostro sito web.
Quindi, aprire la cartella wp-admin e, se c’è un file .htaccess, cancellare anche quello.
Ora potete provare ad accedere al vostro sito web WordPress. Se ci riuscite, significa che il file .htaccess vi impediva di accedere a WordPress.
Una volta effettuato l’accesso, basta andare alla pagina Impostazioni ” Permalinks nel pannello di amministrazione di WordPress e fare clic sul pulsante “Salva” senza apportare alcuna modifica. In questo modo verrà generato un nuovo file .htaccess per il vostro sito web.
Metodo 4: Disattivare tutti i plugin di WordPress
A volte, i plugin di WordPress possono causare questo problema, soprattutto se c’è un conflitto tra due plugin.
Per disattivare facilmente tutti i plugin di WordPress, collegatevi al vostro sito web utilizzando un client FTP o tramite l’applicazione File Manager nella dashboard del vostro account di web hosting.
Una volta collegati, andate nella cartella /wp-content/. Al suo interno, vedrete una cartella denominata “plugins”. È qui che WordPress installa tutti i vostri plugin.
È sufficiente rinominare la cartella dei plugin in “plugins_backup”. In questo modo verranno disattivati tutti i plugin di WordPress installati sul vostro sito web.
Abbiamo anche un tutorial dettagliato su come disattivare tutti i plugin di WordPress quando l’amministrazione di WordPress è inaccessibile.
Una volta disattivati tutti i plugin, provate ad accedere al vostro sito WordPress. Se ci riuscite, significa che il problema era causato da uno dei vostri plugin.
Metodo 5: Tornare al tema predefinito
I temi di WordPress possono causare conflitti anche dopo l’aggiornamento a una versione più recente di WordPress o del tema stesso. Per scoprire se il problema è causato dal tema, è necessario disattivarlo.
Il processo è simile alla disattivazione dei plugin. Collegatevi al vostro sito web utilizzando un client FTP. Quindi, si deve andare nella directory /wp-content/themes/ e rinominare la directory del tema corrente in “themes_backup”.
Una volta fatto questo, provare ad accedere di nuovo. Se ci si riesce, significa che il problema era causato dal tema.
Ora è possibile reinstallare una nuova copia del tema per verificare se il problema si risolve. Se il problema si ripresenta, è necessario contattare l’assistenza del tema o passare a un tema WordPress diverso.
Metodo 6: Reinstallare il nucleo di WordPress
In rari casi, il problema della ricarica persistente della pagina di accesso potrebbe essere causato da file corrotti del nucleo di WordPress.
Questi file fondamentali sono la base del sito web WordPress e gestiscono le funzionalità essenziali. Se questi file si danneggiano o vengono sovrascritti con codice non corretto, possono verificarsi vari errori, tra cui problemi di accesso.
Innanzitutto, visitate WordPress.org e scaricate l’ultima versione del software. Una volta scaricato, decomprimere il file sul computer. Verrà creata una cartella denominata “wordpress” contenente tutti i file necessari per la reinstallazione.
Successivamente, è necessario collegarsi al sito web utilizzando un client FTP o il file manager fornito dal fornitore di hosting.
Una volta collegati, navigare nella cartella principale del sito web. Si tratta della directory principale che contiene cartelle come wp-admin, wp-content e wp-includes.
A questo punto, prendete tutti i file dalla cartella “wordpress” sul vostro computer e caricateli nella directory principale del vostro sito web.
Il client FTP chiederà di confermare la sovrascrittura di eventuali file di base esistenti.
Poiché state eliminando i file core di WordPress danneggiati e li state sostituendo con altri nuovi, scegliete “Sovrascrivi” e selezionate l’opzione “Usa sempre questa azione” per evitare di dover confermare ogni singolo file.
Infine, fate clic su “OK” per avviare il processo di uploader. Il vostro client FTP sostituirà i file principali di WordPress sul vostro sito web con quelli freschi del vostro computer.
Una volta completato l’uploader, visitate il sito web per vedere se l’errore è corretto. Se il problema di accesso è causato da un file core corrotto o da un malware, il messaggio di errore dovrebbe essere sparito e si dovrebbe poter accedere con successo.
Learn More WordPress Soluzioni per la risoluzione dei problemi
Avete riscontrato altri errori comuni di WordPress e avete bisogno di trovare un modo per correggerli? Ecco altri articoli che potete consultare:
- Come correggere l’errore Troppi reindirizzamenti in WordPress
- Come correggere facilmente l’errore “This Site Can’t Be Reached” in WordPress
- Come correggere il messaggio “Il sito sta riscontrando difficoltà tecniche” in WordPress
- Come correggere gli articoli di WordPress che ritornano con l’errore 404 (passo dopo passo)
- Come correggere l’errore di contenuto misto in WordPress (passo dopo passo)
- Come correggere l’errore JSON non valido in WordPress (guida per principianti)
- Come trovare e accedere ai registri degli errori di WordPress (passo dopo passo)
- Come correggere il problema del mancato invio di email da parte di WordPress
- Come correggere WordPress bloccato in modalità manutenzione (in modo semplice)
Speriamo che questo articolo vi abbia aiutato a risolvere il problema del refresh e del reindirizzamento della pagina di login di WordPress. Potreste anche voler consultare la nostra guida completa alla risoluzione dei problemi di WordPress o dare un’occhiata alla nostra classifica dei migliori plugin e strumenti di WordPress per far crescere il vostro sito.
Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.
Goxi
You safe my life man! Just messed around the login wp admin site if it wasn’t for this tutorial I would never have solved the problem!
WPBeginner Support
Glad our guide was helpful
Admin
Tomer
Thank you very much for this tutorial!
I have tried these methods and managed to temporarily fix the problem.
The thing is, that after everything seems to be working again, the next day it happens again. Without me changing anything at all. Any tips on that?
WPBeginner Support
You would want to reach out to your hosting provider to ensure there is nothing on their end that could be causing this conflict
Admin
Sulivan
For those who ended up here an after all steps could’t solve this, check if you changed table prefix. I have changed mines and just figured out that there are some usermeta that stores the old prefix.
WPBeginner Support
Thanks for sharing what was the issue on your site
Admin
shahin
thank you bro , amazing content and very useful
WPBeginner Support
Glad you like our content
Admin
Julie
Tks a lot ! You save me !
WPBeginner Support
You’re welcome, glad our guide could help
Admin
Ann
Thanks a lot to all of you, and specially to Hand: Changing back php version to 7.3 solved this for me!
WPBeginner Support
Glad the recommendations could help you
Admin
Hand
I had this issue and spent an entire day trying every possible solution mentioned here and elsewhere without any progress. Then I remembered that I had changed the PHP version from 7.3 to 7.4 on my hosting’s control panel (DirectAdmin). Changing back php version to 7.3 solved this for me.
WPBeginner Support
Thanks for sharing the solution that worked for you
Admin
Jeff
This worked for me.
Joe
I’ve just worked out that PHP 7.4 missed three of the extensions we had installed on PHP 7.3:
php74-php-opcache
php74-php-process
php74-php-soap
As soon as they were enabled and provisioned the wp-admin 404 error disappeared. Hope that helps you to upgrade to 7.4 trouble-free!
Shiv
Hi
I followed this article and in my case i found one plugin was causing this issue.So it found it by renaming each plugin and keep trying the login and once i reached this plugin and renamed it …admin login worked.So…i renamed back rest of the plugins to their original names and keep this once renamed and admin worked and later i sorted my plugin
Thanks
WPBeginner Support
Glad you were able to get your site working and thanks for sharing the method you used for other users with this issue
Admin
mark
I deleted the htaccess file as instructed, and now I can’t get a login screen at all. No access to my site (404)
WPBeginner Support
To check for the possible issues, you would want to go through the steps in our article here: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Admin
Di
Thanks, you’re a life saver. The .htaccess hack worked!
WPBeginner Support
Glad our recommendation could be helpful
Admin
gho
I owe you one! I used the codes and it’s simply worked. Big thanks wpbeginner!
WPBeginner Support
Glad our guide could help
Admin
Giang Nguyen
thanks man. Your Update Site URL works!
I tried to manually install piece by piece in my local macbook, to learn how wordpress work, and missing your piece!
The install manual doesn’t really have this kind of info =)
giang
WPBeginner Support
Glad our recommendation could help you
Admin
Todd
I’ve had this issue before many years ago and I think my fix was the same this time as it was then. After trying many many suggestions above, what finally did it for me was clearing my chrome browsing history. Someone mentioned trying that and not working, but this was not actually offered as a solution so I thought I would post it. Thanks!
WPBeginner Support
Thanks for sharing what worked for you
Admin
Peter
I was having a login error where my login page keeps refreshing and redirecting me back to the login screen. And for me (I tried all of the above solutions) and none of them worked.
Then I checked the error_log file on my WordPress site and saw that the problem I was having said “WordPress database error Disk full”
As a result, I went into my wp-config.php file and added the following code to file right above the text line where it says in the file “* That’s all, stop editing! Happy blogging. */”.
The code I added is:
define(‘WP_MEMORY_LIMIT’, ‘256M’);
Problem solved.
WPBeginner Support
Thanks for sharing the solution that worked for you
Admin
Chris
Thanks for this – it worked perfectly and tehe memory limit solved the problem. I was really angry because all other stuff like plugins, themes, .htaccess didn’t work!!!
Greetigs Chris
purushotham
i am not able to login my wordpress admin ,getting 404 error.what should i do to reslove the issue.
WPBeginner Support
For a starting point, you would want to reset your permalinks using: https://www.wpbeginner.com/wp-tutorials/how-to-fix-wordpress-posts-returning-404-error/
If that does not solve the error then you could try the troubleshooting steps in our guide here:
https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Admin
Travis
None of these options worked for me… Turns out to be a hosting issue. Called Network Solutions and they said that because my database was over 300mb I needed to upgrade my database because after 300mb they lock you out…. Upgrading by DB fixed the issue. Who knew….?!
WPBeginner Support
Glad you were able to find the solution to the problem
Admin
Chris
How did you upgrade the WP database? I think this may be my problem.
WPBeginner Support
You would reach out to your hosting provider and they would let you know if you need more space for your database similar to Travis
Admin
hamdi
Defining these lines ON TOP OF wp-config.php helped. They don’t help if you put them at the bottom.
define(‘WP_HOME’,’http://example.com’);
define(‘WP_SITEURL’,’http://example.com’);
WPBeginner Support
It should still work if you place it at the bottom of the wp-config file, there may have been a problem with where you placed it depending on what’s in your specific wp-config file.
Admin
Joe G
Nothing worked for me until I went into ftp server and edited index.php in the site’s root (alongside all of the other wp-related files mentioned here), and set define( ‘WP_USE_THEMES’, FALSE )
This will temporarily break your site temporarily (no error codes, just white screen), though my site loading wasn’t the problem. This allowed me to finally access my dashboard through the login site, where I then put a brand new theme on and fixed what I thought might be the culprit (I made the mistake of redirecting my “Home” link on my menu to an exterior site).
After removing the “Home” link, (or just to be safe, the menu in general), and creating a new menu with only the pages in question I wanted to use, I re-set the ‘wp_use_themes’ to TRUE and we’re back off to the races again!
WPBeginner Support
Thanks for sharing what worked for you
Admin
Mohsen
I’ ve tested all of these solutions, but my problem has not solved.
WPBeginner Support
If none of these methods worked then you may want to reach out to your hosting provider to ensure there aren’t any issues on their end.
Admin
Matt Nigro
My issue is that everyone has access to my site…no login required! Can someone help.
WPBeginner Support
Do you mean people can view your site or people can log in to your site? If you mean the login then if you’ve logged in once, WordPress should log you back in but your site’s visitors would still need to log in. If you visit your site in an incognito browser you should see what your visitors see.
Admin
Pranay Singh
I am unable to login to the wordpress admin page as it is showing too many redirects(error) as I had just installed the wordpress and since then I am unable to login the page I have made every change and have checked each possible way through which I can make changes. I have done everything but nothing works. Please help me with the issue.
WPBeginner Support
For the too many redirects error, you would want to take a look at a different article of ours located here: https://www.wpbeginner.com/wp-tutorials/how-to-fix-error-too-many-redirects-issue-in-wordpress/
Admin
Peter Guckian
For some reason, everytime I go to login into my work’s cms site it redirects me to the actual website rather than the dashboard, have deleted browsing history, cookies, cache etc but no luck. Nobody else in the office seems to have faced this difficulty before
WPBeginner Support
If you’re using the /wp-admin url to log into the site you may want to try instead using /wp-login.php to see if your browser is not fully clearing the cache.
Admin
Hugo
For me the solution was deleting user.ini file in the root of my site
This file was created by host
WPBeginner Support
Thanks for sharing this method, hopefully it helps anyone else if the above methods don’t work
Admin
Stephen Vincent Abarca
I have a problem in my login. When I visit my site with /wp-admin it then put itself to /wp-login.php with a popup login indicating “your connection to this site is not private”. I cannot login even I put my user and pass.
WPBeginner Support
WordPress should normally redirect you to that page if you have not logged in. From the error, you may need to ensure your SSL and https are set up correctly: https://www.wpbeginner.com/wp-tutorials/how-to-add-ssl-and-https-in-wordpress/
Admin
mahyar
thank you for your guide
i delete htaccess and every thing fixed
i made another one from setting and save
then i compare both backup file and new one
the backup one has some extra entries
is it ok? or i wil face problem?
WPBeginner Support
It would depend on what is in the file, you would normally lose any added settings such as: https://www.wpbeginner.com/wp-tutorials/9-most-useful-htaccess-tricks-for-wordpress/
Admin
Stefano
My issue is little different. When I click on customize theme, i get white page.
Also tried to install the default theme, but nothing changes. I noticed one thing in the url, this code %3A%2F%2F instead of // and that should be part of the problem i think…
I wanted to ask if someone had the same misadventure and how he solved it. Thanks P.S. This problem occurred to me a few months ago, but I had not given too much weight, thinking it would be resolved with a new upgrade, but unfortunately it was not …
WPBeginner Support
The %s are it encoding the symbols in the url, that would likely not be your issue. You may want to try increasing your memory limit: https://www.wpbeginner.com/wp-tutorials/fix-wordpress-memory-exhausted-error-increase-php-memory/
To see if you are running out of memory as it is loading or check with your host to see if this could be an error that they can see.
Admin
Reza Taba
Divi Builder plugin was the culprit. Disabling it resolved the issue. Then I uninstalled and reinstalled it.
FIXED.
Thanks for the help!
Marnus
None of the mentioned methods worked for me.
Resetting my password worked for me though.
And no, I did not try to log in with the wrong password.
I tested using a wrong password and the site would respond accordingly by saying it is wrong, but when using the correct password, it would just be in the login loop.
Michael Morad-McCoy
NONE of the above worked! Very, very frustrated as I need to migrate my site to a new host and doing so manually hasn’t worked so I wanted to try a plug-in. But I cannot access Network Admin to add the plugins!! Arrgh!
saurab
Hi
I tried all these steps but still i am not able to login.
Chinmay Ray
Hi, Thank You for this blog it cleared alot of my doubts. I have one query
i have access to wordpress however, when i login with email and password, i come back to the website instead of wordpress dashboard of that website. Yes am not admin. i have been given access by my client.
please help me with this.
WPBeginner Support
Hi Chinmay,
The client may have a plugin to redirect users to the homepage upon login. You may need to ask them to find and disable that plugin.
Admin
ken
once again. this site save my site.
saber.tabatabaee
my case in mysql status of admin user changed to zero 0 and just need to change it to 1
MR-wp
Hello dear admin
I’m really Thankful
my problem solved after 2 hours struggling
I am from Iran and I am very happy I visited your website.
Wim
Those 2 last lines of code helped me… A LOT!
Many thanks for this post…
Rama
i tried all this steps and field to login return me to home page is there is any another solution to fix this issue ? and thanks.
Dapo Momodu
When i disabled my plugins folder from cpanel i was able to login. So now i will look for the plugin that made it act like that
Rams
Thanks a lot. I dig my head for more than a day on this. I have to move my client’s website from our server to HostGator and I found that even if I gave valid login credentials, I can’t logs into it.
The stupid thing I did is if WordPress Address URL and Site Address URL is not same, Google Chrome can’t allow to logs in.
The problem is domain is redirected to www. Since WordPress Address URL doesn’t have www, Chrom didn’t recognize as a legit one.
Thank you so much for your effort in making this valuable article.
WPBeginner Support
Hi Rams,
Glad you found it helpful. Don’t forget to join us on Twitter for more WordPress tips and tutorials.
Admin
Emilia Wiliams
IT WORKED. Thanks!
I deleted all public, primary and sub-domain .htaccess though.
Then saved permalinks and all was good.
Paul de Jong
Hi,
None of that worked, but using this did:
define (‘RELOCATE’, true);
Thanks.
Luke
Hello Paul,
Where did you put that code?
in the wp-config file?
Manas Dattagupta
Pls tell me how? And where did you put those code.
Umair
I also had tried all methods but nothing work. At end when i define my site URL it worked for me.
Thanks a lot admin.
define(‘WP_HOME’,’http://example.com’);
define(‘WP_SITEURL’,’http://example.com’);
these lines worked for me.
Serge
Works well for me (just need to wait for a while….)
wp-config.php
define(‘WP_HOME’,’http://example.com’);
define(‘WP_SITEURL’,’http://example.com’);
Thanks
Cheers
Serge
shivpujan patel
hello sir my wordpress site login page this has been disabled .. please help me
HengamV
I had the same problem for a week … I tried everything on this list and so more and nothing helped to fix that … just try this one too and let me know if it works:
download “php.ini” file and delete it !
if it works then there is problem with a code in this file … solve the problem making code and fix it and again upload “php.ini” back into your public_html folder
Luke
HENGAMV – That works!!
“download “php.ini” file and delete it !
if it works then there is problem with a code in this file … solve the problem making code and fix it and again upload “php.ini” back into your public_html folder”
MT!
Nikhil
HI,
what a great post it helped me my site started working thank you very much.
Anna
“Update Site URL” for the win! Thanks so much. I was neck deep in suggested help articles before I found this. Worked immediately, and super simple too.
July
Thanks a lot! It worked!
Craig Wallace
Another deficiency in WP environment.
Fast becoming a poor choice for web developers.
Alex
None of the solutions worked for me. But what I discovered was my host provider suspects a custom script was malicious and placed a post block on my server. Once I removed that, I can login again.
Shabeel
Dear Sir,
Same Problem here.. None of the solutions worked for me. May I How to remove that custom script from my server. ??
Holly Louise
This is too damn upsetting. EVERY time I try to log in to my wordpress.com account I am told I have the wrong password EVEN when I get it reset by wordpress!! I am NOT going to disable all my extensions. I am NOT going to clear my cache every time I want to log in to use my account. Pain in the arse. Figure it out people. Find a way for the users to actually use this thing! This has been going on for years and it is WHY I rarely ever use wordpress.
WPBeginner Support
Hi Holly,
Your issue is probably related to WordPress.com. This article is about self hosted WordPress.org websites. Please see our article on the difference between WordPress.com vs WordPress.org.
Admin
Hamza Khan
i have this problem in all of my sites that are hosted in my dedicated server.