Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Come risolvere il problema di aggiornamento e reindirizzamento della pagina di accesso di WordPress

Quando cerchiamo di accedere ai nostri siti web WordPress, a volte la pagina di login si aggiorna e si reindirizza continuamente, impedendoci di accedere all’area di amministrazione di WordPress.

Se state sperimentando questo problema, non siete i soli. Il problema dell’aggiornamento e del reindirizzamento della pagina di login di WordPress è comune e frustra molti proprietari di siti WordPress. Detto questo, abbiamo testato diversi metodi collaudati per risolvere il problema.

In questa guida completa, vi mostreremo come risolvere il problema del refresh e del reindirizzamento della pagina di login di WordPress. Immergiamoci e torniamo alla dashboard di WordPress per riprendere il controllo del vostro sito web!

Fixing the login page redirect and refresh issue in WordPress

Cosa causa il problema di aggiornamento e reindirizzamento della pagina di login in WordPress?

L’errore di aggiornamento e reindirizzamento della pagina di login di WordPress (chiamato anche loop di reindirizzamento del login di WordPress) è solitamente causato da impostazioni errate dell’URL di WordPress o dalla mancata impostazione dei cookie di login.

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.

Login page redirect issue in WordPress

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.

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.

Clear browsing data in Google Chrome

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”.

Clear cookies and cache in Google chrome

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”.

WordPress URL settings

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.

Editing wp-config.php file via FTP

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.

Delete .htaccess file in WordPress

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 i plugin

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.

Rename plugins folder to deactivate all plugins

È 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.

WordPress files

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.

Upload core WordPress files

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.

Overwrite core files

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.

Video tutorial

Se avete bisogno di istruzioni visive, guardate il video qui sotto.

Subscribe to WPBeginner

Cosa fare se non si riesce a correggere il problema del reindirizzamento dell’accesso a WordPress

Se avete provato di tutto, dal cancellare i cookie del browser alla disattivazione di temi e plugin, ma il problema persiste, potete provare a chiedere supporto alla comunità di WordPress.

Gli utenti di gruppi come il gruppo Facebook di WPBeginner Engage potrebbero aver riscontrato il vostro stesso problema e potrebbero fornirvi indicazioni su cosa fare per risolvere i problemi della pagina di accesso.

The WPBeginner Engage Facebook group

A parte questo, potete rivolgervi a soluzioni di assistenza WordPress come WPBeginner Pro Services. Offriamo un servizio di assistenza WordPress d’emergenza, in cui gli esperti possono individuare cosa sta succedendo al vostro sito web e risolvere il problema alla radice.

Potete anche assumere i nostri servizi di manutenzione di WordPress per evitare che problemi come malware, tempi di inattività elevati e WordPress obsoleto colpiscano il vostro sito web in primo luogo.

WPBeginner Pro Services

Non esitate a prenotare un appuntamento con il nostro team oggi stesso per vedere cosa possiamo fare per sistemare il vostro sito web.

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:

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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

354 commentiLeave a Reply

  1. Thanks for this video and the post. I tried above all of your methods but none of them fixed the issue. read the comment and found a solution as below. Edit HTTPS to HTTP.

    define(‘WP_HOME’,’https://example.com’);
    define(‘WP_SITEURL’,’https://example.com’);

    to

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

    • The issue with this method would be that your site would start to show the not secure message as your site would not be using HTRTPS. This can be a temporary workaround but you would want to update your site to use HTTPS after you are able to log in.

      Admin

    • If none of the methods from this article are working for you, we would recommend reaching out to your hosting provider for them to check if there are any errors on their end.

      Admin

  2. Thanks a lot,

    You saved my day,
    I have changed the file wp-config.php as described in the tutorial and that worked for me.

    My best regards.

  3. I messed around with the Update WordPress URL Settings
    and that was a world of pain to correct as it took my whole site down. I had to correct it through changing the config settings using FTP.

    • The settings are definitely powerful and can cause issues if you change them incorrectly. Glad you were able to fix the issue using FTP!

      Admin

  4. Tried all and none worked. Here is what worked:
    Went to wp-config.php and set define( ‘WP_DEBUG’, false); to define( ‘WP_DEBUG’, true );
    Tried logging in again and got “usermeta table missing” error.
    Thats when I realised I had a missing table. Got it from another installation and changed the table prefix to meet current db.
    Worked immediately

    • Thank you for sharing this, for most beginners we recommend reaching out to their hosting provider if our recommendations do not work as they can check for less beginner friendly errors.

      Admin

  5. Thank you – that tip about restoring the admin page by adding two lines of code in the config file seems to work nicely (still crossing fingers), but I have hope now, which I didn´t earlier.

  6. Glad our guide could help and if you hadn’t set up SSL before changing to https that would definitely be the most likely cause.

    Admin

  7. Thank You, it worked.

    I initially had the siteurl & wp address url changed to “https”, and this made me unable to log-in my dashboard. Maybe because I had not ssl at my host set-up.

    Re-changing the “https” to “http” helped me log-in back.

  8. Everything didn’t work. But after downgrading my PHP from 7.4 to 7.2, I was able to login.

    Kinda weird, now I’m using an older PHP version.

    Did you encounter an issue similar to mine? I want to use the newer PHP version, but it doesn’t let me login in wp-admin.

  9. This issue has never happened to me before, but the 2nd / plugin option worked for me right away.

    This website is a lifesaver! Thank you so much!

  10. I tried some of these steps, but the problem turned out to be elsewhere: my site was setup as a ‘multisite’ but in wp-config file it said ‘subdomain_install’ as ‘false’, when I changed it to ‘true’, I could login to the site normally without redirects

    • This was also my problem! I tried all the steps mentioned in the article, but after changing the ‘subdomain_install’ from false to true in the wp-config.php file it worked!!

      Thanks!!

    • I have been trying to solve this for MONTHS… Thanks to your comment, I was able to fix it in about 10 seconds. Thank you so much for sharing!

      This should be included in the tutorial.

  11. I followed the instructions to deactivate all plugins and I now have access to wp-admin again! The instructions were easy to follow, and thanks so much for putting them out there.

  12. Thanks for this great help. The plugin folder renaming worked for me. There was an issue with one of the plugins. Thanks once again :)

  13. I was looking for a solution for over 5 hours now – nothing worked. But deleting the htaccess file in the wp-admin directory helped!
    I cant thank you enough.
    Made my day.

  14. Thank you for sharing those tips, unfortunately none of them have worked for me. I even uninstalled the whole wordpress plugin. I don’t know what should i do next :(

  15. I couldn’t find my wp admin page. It shows

    “There has been a critical error on your website. Please check your site admin email inbox for instructions.

    Learn more about debugging in WordPress.”

    How can I fix this error?

  16. Hi, i have change by mistake my url and now the domain wp admin login url bring me to other site and i cont have ftp access how i can change back them?

    • You can either reach out to your hosting provider or if you have phpMyAdmin access you could change the options table and update the URL and address.

      Admin

  17. define(‘WP_HOME’,’https://www.example.com’);
    define(‘WP_SITEURL’,’https://www.example.com’);

    where do these two lines add in wp-config.php file?

    At Last OR At Start?

    Please clarify

    • As we state in the article: paste the code just before the line that says ‘That’s all, stop editing! Happy publishing’.

      Admin

  18. Thank you so much for your post. I’m a newbie with WP. These lines worked for me

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

    I also changed the below line from false to true.

    define( ‘WP_DEBUG’, true );

    • Glad our recommendation could help, the WP_Debug you should be able to return to false should you want :)

      Admin

  19. thank u so much after spending so much time after deleting that .htacces and restart my mac open the website finally thanks for ur time

  20. 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!

  21. 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?

    • 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

  22. 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.

  23. 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.

    • 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!

  24. 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

    • Glad you were able to get your site working and thanks for sharing the method you used for other users with this issue :)

      Admin

  25. I deleted the htaccess file as instructed, and now I can’t get a login screen at all. No access to my site (404)

  26. 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

  27. 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!

  28. 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.

    • 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

  29. 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….?!

  30. 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’);

    • 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

  31. 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!

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.