Forum Moderators: rogerd & travelin cat

Best way to redirect woo commerce to another directory

         

PPMMaster

4:56 pm on Mar 25, 2026 (gmt 0)



Long Story Short The woo commerce on my WordPress site is king back thousands of "Alternate page with proper canonical tag"
errors, all with ?add-to-cart=437 endings leading to the wrong cart page. I think these were caused by a faulty plugin
I am told these errors do not hurt my site performance but I would like to be rid of them

After researching it I was told there was not much I could do fix it (and the fixed I tried did not work) , I decided to put a separate install of WordPress and woo commerce in directory on the site. (this was to allow it to exist without a lot of plugins need for the pages of the main site)

I can't do a straight directory .htaccess redirect because wile I did copy the content, I cleaned it up, so the structure is not the same

I can 301 redirect the actual shopping cart pages

but what about the phantom links,? Can I simply uninstall the old woocommerce? Or do I need to handle those links with a redirect?

Any input would be helpful

They New install is live but without links to it yet

not2easy

5:39 pm on Mar 25, 2026 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



You can install more than one installation of WP without any issue but there are steps to take to ensure that WP is using the right links. Some people want their WordPress URL to coincide with their website's root (e.g. https://example.com) but they don't want all of the WordPress files cluttering up their root directory. WordPress allows you to install it into a subdirectory, but have your website served from the website root. This also adds a layer of less vulnerability for all those "just testing" bots.

Each installation needs its own database. The sub-directory can be served as the main page for the site with a few adjustments. Wordpress.org has some easy to follow instructions here: [developer.wordpress.org...]

I is best to avoid redrects when you can, Google doesn't like to find a lot of redirects.

lucy24

3:27 am on Mar 26, 2026 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It is best to avoid redrects when you can, Google doesn't like to find a lot of redirects.
With emphasis on “when you can”. If the site has been substantially rearranged, you can’t really avoid redirects--unless you do extensive rewriting, which carries perils of its own. Just make sure each page has one and only one URL, with any others (probably unavoidable as artifacts of the CMS) redirected as appropriate.

When G### suddenly finds a lot of redirects, it reacts by requesting nonexistent URLs to confirm that the site isn’t just redirecting all bad requests to the root, but is returning a 404 when appropriate. So double-check that the site returns a 404 when you request a nonexistent URL.

Edit, with the risk of topic drift: Did they stop doing this at some point when I wasn’t paying attention? I searched archived logs and found nothing after 2020. Urk.