Quick And Easy Fix For ERR_TOO_MANY_REDIRECTS ...
文章推薦指數: 80 %
Usually, this error indicates an incorrect configuration in your WordPress settings file, and, as a result, there is a cyclic redirection — your ... Plans&Features WhyUs? Contact Login SignUp WhileworkingonyourwebsiteontheWordPressplatform,youcouldfacesomeerrors.OneofthemostpopularonesisERR_TOO_MANY_REDIRECTSWordPressError.InGoogleChrome,youwillseethefollowingnotification:Thispageshowsacircularredirectloop,inFirefoxitwilllooklike:Thepageisnotredirectedproperly.Usually,thiserrorindicatesanincorrectconfigurationinyourWordPresssettingsfile,and,asaresult,thereisacyclicredirection—yoursitecannotstoptheredirectionprocessfromonepagetoanother.Usually,WordPressPluginsormisconfiguredserverscancausethiserror.Donotworrybecausesolvingthiserrorcanbequickandeasy. Inthisarticlewewillcoverthefollowingtopics– TableofContents ERR_TOO_MANY_REDIRECTSChrome ERR_TOO_MANY_REDIRECTSFireFox ERR_TOO_MANY_REDIRECTSMicrosoft WhatisErr_Too_Many_Redirectserror? HowToFixERR_TOO_MANY_REDIRECTSError? Conclusion Thiserrorcanbedisplayedwithdifferentnamesondifferentbrowserssomeofthemareshownbelow: ERR_TOO_MANY_REDIRECTSChrome errtoomanyredirectschromeERR_TOO_MANY_REDIRECTSFireFox ErrtoomanyredirectonFireFoxERR_TOO_MANY_REDIRECTSMicrosoft ERR_TOO_MANY_REDIRECTSonMicrosoftedgeERR_TOO_MANY_REDIRECTSonSafariWhatisErr_Too_Many_Redirectserror? WhenyouvisitawebpageyougettoseeanErrordisplayonyourbrowsershowing“Err_Too_Many_Redirects”,thissimplymeansthatYourwebsitegetsstuckonacontinuousinfiniteloopofredirectionsandyourwebsitekeepsonsendingyoubackandforthbetweentheURLswhenitgotfinallytireditultimatelydisplaysthis“Err_Too_Many_Redirectserror”. WehavealsocoveredsomeofthemostcommonHttpStatuscodeerrorsforyoulikeError502BadGateway,Error404, 504gatewaytimeouterror Therearemanyreasonsbehindthiserrorsomeofthereasonsare: WebsiteTheme ChangesinWordPressCorefiles Pluginsissue Webserver HowToFix ERR_TOO_MANY_REDIRECTSError? Beforestarting,makesurethatyouareable: ToaccessyourhostingcontrolpanelviaawebbrowserorFTPclient. ToaccesstheWordPressadminofyoursite(optional). Step1—ChecktheSettingsofYourURLs Step2—DisablingPlug-ins Step3—Deactivatethe.htaccess/NginxConfigurationFiles Step1—ChecktheSettingsofYourURLs Thefirstthingyoushouldcheckisthesettingsofyoursite’sURLs. Youcandothisviavariousmethods: Option1—VerifyURLthroughtheAdminConsole IntheWordPressadminsection(wp-admin),clickon‘Settings’.Bydefault,yourGeneralSettingsaredisplayed.ChecktheWordPressAddress(URL)andSiteAddress(URL).MakesurethattheURLsthatyouseearecorrect.IftheinstallationofyourWordPressismadeinasubdirectorybutnotinarootfolder,forinstance,thesiteisuploadedto/public_html/wp/,thentheURLmustbewww.example.com/wp.IncasethesitehashttpsenabledandhasanSSLcertificateinstalled,thenadd‘https’totheURL. Ifyoumadeanychanges,besuretoclicktheSaveChangesbuttonatthebottomofthepage. Option2—Check/ChangeURLsettingsmanually PerhapsyoucannotaccesstheadminconsoleofyourWordPresswebsite.Inthiscase,youcanchangetheURLaddresssettingsusingthewp-config.phpfilewiththefilemanagerandacodeeditor.Youcaneditthefileusingtheonlinefilemanagerprovidedbythehostingprovider.Anotheroptionistodownloadit,edititandthenuploaditbacktotheserverviatheFTPclient.Intheexample,wewilleditthefileinthefilemanager: Gotoyourfilemanagerthroughyourhostingcontrolpanel. Findthewp-config.phpfile. Clicktoedit. Addthefollowinglinestothefile,makingsuretoreplacehttp://example.comwiththelinktoyourWordPresswebsite.Forexample,ifWordPressisintherootdirectory(/public_html/),justuseyourowndomainname,ifitisinasubdirectory(/public_html/wp),replaceitwithaURLwithasubdirectory(http://example.com/wp). Youcanaddlinesattheendafterallthecodethatisalreadyinthefile: define(‘WP_HOME’,‘http://example.com’);define(‘WP_SITEURL’,‘http://example.com’); BesuretosavethechangesbyclickingontheSaveicon. GotoyoursitetocheckwhetherthechangeofWordPressURLaddresseshelpedtofixERR_TOO_MANY_REDIRECTSerror. IMPORTANT:Donotforgettochangehttp://example.comtoyourcurrentwebsiteaddress. Option3—editingURLsettingsthroughyourdatabase editingURLsettingsthroughyourdatabaseAsWordPressisbasedonPHP,itusestheMySQLdatabasetostoreallthenecessaryinformation.So,yourMySQLdatabasestoresthefullinformationaboutyourposts,pages,plugins, profiles,andconfigurations.SowhenyouchangedsomethingonyourWordPresswebsite,itisreasonabletochangethestoredinformationinMySQLtables. Itisnotdifficulttodo.Itwillrequireminimaleffortandseveralminutesofyourtime.Let’sseesomedetailsabouthowtochangetheURLsettingsofyourwebsiteviatheMySQLdatabase. Whatallyouneed Intheverybeginningmakesurethatyoucanaccessthehostingcontrolpanel.YouwillrequiretheDatabaseManager,likeAdminerorPHPMyAdmin’saccess,aswellasyourloginandpassword.Youcanfindthedatabaselogindetailsinthewp-config.phpfileorusually,youcanalsofindtheinformationrightinthehostingcontrolpanel.Ifyoucannotfindit,pleasecontacthostingtechnicalsupport.Theywilltellyouhowtoaccessyourdatabaseonline. 1—DeterminingthenameoftheWordPressMySQLdatabase IfyouhaveonlyoneMySQLdatabaseonyourhosting,youmightskipthisstep.Ifyouhaveseveraldatabases,findtheonethatcontainstheinformationaboutyourWordPress.Inmostcases,itsnamewillcontaina‘wp_’index.Ifitisnotso,openthewp-config.phpfileandfindadatabasename.Toaccessthisfile,youcanusetheonlinefilemanagerorFTPclient. 2—EnteringphpMyAdminorAdminerDatabasemanager Whenyouopenyourhostingcontrolpanel,findtheDatabaseManagersectionandclickonthelinktoopenitandmakeabackupofthecurrentdatabasebeforemakinganychanges 3—Selectingthedatabase Ontheleftsideofthescreen,findthedatabasethatcontainsalltheinformationaboutyourWordPress.Clickonitsnametoopenit. 4–FormattingSQLQuery TochangetheURLsettingsofyourwebsite,gotoSQLtabwhereisyoushouldpastethefollowingcode: UPDATEwp_optionsSEToption_value=replace(option_value,‘oldurl.com’,‘newurl.com’)WHEREoption_name=‘home’ORoption_name=‘siteurl’;UPDATEwp_postsSETguid=replace(guid,‘oldurl.com’,’newurl.com’);UPDATEwp_postsSETpost_content=replace(post_content,‘oldurl.com’,‘newurl.com’);UPDATEwp_postmetaSETmeta_value=replace(meta_value,’oldurl.com’,’newurl.com’); Thispieceofcodewillchangeallyouroldlinkstothenewlinks. IMPORTANT!Donotforgettochangethelinksintheexampleintoyourownones.Ifyoudonotchangethem,theirwebsitewillnotworkatall.IMPORTANT!SometimestheindexatthebeginningofthenameofMySQLtablewillbedifferentfrom‘wp_’. Inthiscase,youshouldreplacetheindexinthequeryabovewiththetableprefixvaluethatyouseeinthewp-config.phpfileofyourWordPresswebsite. 5–RunningSQLcommandWhenyoucheckedyourwebsitelinksandinsertedalltheprogrammingcodechangesintothetextfield,clickontheGobuttontoruntheoperation. 6–VerifyingtheURLchangesIftheoperationwentsuccessfully,youwillseeamessageinagreenbox.Thesystemwillalsoshowyouhowmanychangesweremade.Afterthat,in99%ofcases,theerrorisfixed.Ifsomethingwentwrong,checkifyouenteredeverythingcorrectly. Step2—DisablingPlug-ins AnotherreasonthatcancauseERRTOOMANYREDIRECTSerrorisanoutdatedpluginoraconflictbetweenoneormorepluginsofthetheme.Agoodideaistoturnoffallyourpluginsandtrytoaccessyoursiteand,andtherebyfixthebug.Youcandisableallofyourpluginsveryquicklyandsimply: GotoyourFileManagerthroughyourcontrolpanel. Findthewp-contentdirectoryandenterit.YouwillseethePluginsdirectory. SelectthePluginsdirectoryandselecttheRenameoperation.Nowrenameittoplugins_backup,forexample,oranyothernameotherthanPlugins.Donotworry,thepluginswillnotbedamaged,youwillbeabletorenamethedirectorybacktothePluginsafteryoufinishthetest. SavethechangesbyclickingonthegreenSaveicon. Onceyourenamedthepluginsdirectory,trytoaccessthesite.Iftheerrordisappears,itmeansoneormorepluginscausetheerror.TrytoremovethemostrecentpluginsandrenamethedirectorybacktoPlugins. YoucanremoveyourpluginsusingFTP/FileManagerinthewp-content/pluginsdirectoryandremovetheplug-inthatyouhaveselected.Forexample,youwouldliketoremoveWoocommerceintheFileManager.Justmarktheplug-inwhichyouwanttodeleteandpressDelete. Step3—Deactivatethe.htaccess/NginxConfigurationFilesAnotherreasonforaninfiniteredirectorERRTOOMANYREDIRECTSerrorcanbeanincorrect.htaccessorNginxConfigurationfilesettings.Inthiscase,youcandisablethe.htaccess/NginxConfigurationfiletorecovertheaccesstothesite. Deactivatethe.htaccess GototheFileManagerfromyourcontrolpanel. SelecttheApache/NginxConfigurationfile,right-clickonitandselectRename. Gotoyoursiteandseeifitisavailable. TryDeletingCacheandCookiesofyourbrowser Itcouldalsobeanissuewithyourbrowsercookies.Tobegin,erasethemalongsidetheCachememory.YoucandothisbythepropertiesandsettingsofyourbrowserasshownbelowintheChromebrowser. DeletingCacheandCookiesofchromeCachememoryandCookiesarepartofyourbrowsertemporaryfilesthatstoreallthesettingstonavigateawebsite.Amongtheotherfactorsthataresaved,youwilldiscoverthelanguage,yourlocationanddifferentfactorsrelatedtothenavigationoftheoneyouarevisitingthesite.WhatCachesimilarlydoesistostorethepagesofthewebpagesyouvisitrecentlysothatwheneveryoutrytobrowsethesamepageagain,youwon’tneedextradataorloadingpagetime. Evenyoufinditsurprisingthatyourwebsitealsostorescookies,andhenceyoualsoneedtoeliminateit.Forthis,youneedtoaddthefollowingmentionedcommandinyourwp-config.phpfile. commandinyourwp-config.phpfile IMPORTANT:Sinceyoursitemaystopworkingaftermakingsomechanges,alwaysmakebackupsoftheoriginal.htaccess/Nginxconfigurationfilebeforemakinganychangestoit.Alsoremember,ifyoureplacesomesettingsintheApacheorNginxfile,somepermanentlinks,plug-ins,andsettingsmaystopworking. Conclusion Inthistutorial,weshowedthreepossiblewaystosolvetheERR_TOO_MANY_REDIRECTSerrorinWordPress.Pleasefeelfreetoshareanyothermethodsthatmighthavehelpedyoufixtheerrortoomanyredirectserror. 2Repliesto“QuickAndEasyFixForERR_TOO_MANY_REDIRECTSWordPressError” Pingback:Toomanyredirectserrorwhenchangeofbaseurl–WordPressSolutionsGroup HeyAabhas,thankyouforyourguidance.Itwasawonderfularticle.Irecentlybloggedaboutthisaswell. Reply LeaveaReplyCancelreplyYouremailaddresswillnotbepublished.Requiredfieldsaremarked*CommentName* Email* Website Savemyname,email,andwebsiteinthisbrowserforthenexttimeIcomment. Δ Postnavigation PreviousPostPreviousTop4WordPressMigrationPluginsNextPostNextHowtocreateaLiveStreamonyourWordPresssite TableofContents ERR_TOO_MANY_REDIRECTSChrome ERR_TOO_MANY_REDIRECTSFireFox ERR_TOO_MANY_REDIRECTSMicrosoft WhatisErr_Too_Many_Redirectserror? HowToFixERR_TOO_MANY_REDIRECTSError? Conclusion WebmasterTools SMTPServerForTesting EmailExtractor Pingtool SSLChecker FindAllWebmasterTools
延伸文章資訊
- 1Err_Too_Many_Redirects in WordPress: How to Fix It in 2 ...
- 2WordPress wp-admin 出現重新導向次數過多? | 遠振Blog
今天要跟各位分享一個WordPress 常見的問題:WordPress wp-admin 區域出現”重新導向次數過多“,Chrome 瀏覽器會出現 ERR_TOO_MANY_REDIRECTS。
- 3Easy Fixes for “ERR_TOO_MANY_REDIRECTS” Error on ...
How to Fix “ERR_TOO_MANY_REDIRECTS” Error · Clear Your Browser's Cookies · WordPress URL Settings...
- 4"Too many redirects" ONLY when trying to access wp-admin ...
I found a solution that fixed my issue. Sources: A.) https://sharpten.com/blog/2018/01/17/wordpre...
- 5How to Fix ERR_TOO_MANY_REDIRECTS in WordPress
The ERR_TOO_MANY_REDIRECTS error happens when a browser can't connect to the correct server of yo...