Wordpress too many redirects issue on localhost - wordpress

I am facing the issue as described in the title. I am working on a Woocommerce site with default WP Twenty Nineteen. Everything was working fine but I have mistyped https in the WP admin General Settings Site Url field. This caused too_many_redirects error on both Chrome and Mozilla. I have tried clearing cookies and complete browsing data, disabling plugins, changing permalinks and deleting htaccess file but none of this worked. Maybe this can help but strangely I can access admin but cannot see none of the pages. Any help would be appreciated. Thanks!

In wp-config.php add this 2 lines (with your protocol+domain_name):
define('WP_HOME','https://yourdomain.com');
define('WP_SITEURL','https://yourdomain.com');

Related

Wordpress Login page redirects back to itself

I’m trying to log in to wordpress dashboard but it redirects back to login page causing 302 error.
I’ve tried all solutions suggested in the internet including clearing caches, deactivating plugins and themes, changing url in wp-confing.php and deleting .htaccess file but none of above did't help… How can I solve this?
Thanks in advance!
Open your domain manager backup your site from cpanel and reinstall wordpress using cpanel. I think it should work

Why I am redirected to different plugin page url after activating any other plugins in wordpress?

Plese help me figure out this bug.
Problem:
I had installed a syntax highlighter plugin named "Enlighter". But it didn't work as I expected. So I went ahead and deactivated and deleted the plugin files.
Now the problem is that whenever I am trying to activate any other plugins it is redirecting me to the "enlighter" about page. Here's what my url looks when I try to activate any plugins: http://localhost/wp/wp-admin/admin.php?page=Enlighter-About
When I tried to activate TinyMCE Advanced Plugin it is redirected to the above-mentioned URL. You can read the error message in the screenshot attached. However, when I press the back button I can see the "TinyMCE" plugin activated.
I want to know how to fix the problem so that it is redirected to its relevant plugin page instead of enlighter's plugin page.
Thank you!
Okay, So after sharing this problem with "englighter's" plugin developer on the WordPress forum he asked me to clear the browser cache and php op-code cache.
So I resolved this problem by clearing all the browser cache and then everything worked fine for me.
Here's our discussion thread on WordPress https://wordpress.org/support/topic/wrong-plugin-page-redirection-upon-activating-any-plugin/#post-9302622

Issues with Wordpress permalink /index.php/%postname% instead of %postname%

I've tried to change my permalinks from example.com/index.php/postname to example.com/postname, but nothing has worked. When I change them in Wordpress, I get 404 errors for example.com/postname. I've noticed this is a common issue, but none of the suggested solutions have worked.
Mod_rewrite is enabled on the Apache server. The .htaccess file has been updated. Still nothing. In the meantime, I'm wondering if I could do a redirect that would send anyone with the example.com/postname link to example.com/index.php/postname. What's the best way to do that?
You generally need to save permalink structure twice. If that doesnt work install wp 2017 theme > delete your theme > reinstall your theme from scratch.
If you have cloned your website - you should go to the original site, back it up and then deploy it! a good plugin to do this is updrafts if you don't know how to do it mannually. Don't use a cloning plugin - some plugins/themes don't work with them.

One page won't show on wordpress after moving from live to localhost

I moved my website from live to localhost to make some modifications to it and I have encountered a problem, one page will not show up: "Oops! That page can’t be found.".
I have tried the following
1. activated rewrite_module
2. deactivated each plugin to see if anyone is causing the problem
3. recopied the database and files in case of failure during the first transfer
4. read that resetting permalinks might solve the problem. Changed permalinks to default - the page now works, but when I changed back to custom the problem is still there.
This is weird because only one page does not seem to show, every other page works fine and also there is no problem on the live version.
I ran out of solutions can any one please help?
This may be caused by the permalink or .htaccess
check the url of your page if no issues on URL then
Follow this steps once:
Go to settings-> permalink-> set it as default ->Reload or refresh
Then again now Go to settings-> permalink->postname
Your .htaccess will get update with the permalink.
This could be a problem with htaccess. When using the query string urls in wordpress, no htaccess is required, but for anything else Wordpress uses mod_rewrite.
Is htaccess turned on your localhost Apache server? In httpd.conf, AllowOverride All should be turned on in your active directory.
Is Wordpress able to create new files? Insufficient permissions might prevent it from creating the htaccess file.
Finally, check that your links are pointing to the right place. Sometimes the problem is as simple as a misspelling in your link ;) Good luck.

Strange redirect / rename behavior on website

I have a website that has started exhibiting strange redirect behavior. It is a wordpress site running on Apache.
I've disabled all the wordpress plugins, disabled/baselined the .htaccess file to a wordpress default. None has had any effect.
What is happening is if you go to:
http://siteurl.com/dir it redirects you to https://siteurl.comdir
(deletes the / between .com and dir)
I've tried googling etc. can't seem to find any clues of where to look. I'd appreciate any tips on where to check/adjust. I've looked at the site's DNS configuration on the hosting provider and I can't see anything that would be affecting it. I have other sites on the same hosting provider/vps and they work correctly.
I think you can try one thing disable all pugins as well as the activate the default wordpress theme. After then change the permalink to default. I hope this will work for you. Let me know so i can find other solution.

Resources