admin管理员组

文章数量:1122832

A half cooked WordPress website, using (a) Custom Permalink plugin (b) Poly_lang plugin (c) WP Rocket Pro plugin (no CDN) was assigned to us.

We noticed that Slugs of many pages were different in production site from the staging site. We were to match them as per the staging's (because they already had SEO ranking).

However, soon it dawned upon us that many pages were simply not getting staging's slugs. After changing its slug, when we tried visiting the page: (a) WordPress wither redirected them to home page (b) showed 404 error (c) missing lang_code in their address.

Another enigma is that it happened on some pages and some pages would easily change their slugs. We tried deleting the page (for All the languages), then recreating from scratch; and that worked for some pages, and some pages still couldn't change. Moreover, this approach magically worked if we deleted the pages two or three times again, and then recreated. But still for some pages recreating even 3 times didn't work either.

We were out of ideas. And today the issue is gone, automatically. We have no confirm idea how! Now, I can change the slugs, and WordPress would retain it. if it doesn't, I go back to edit panel, write the correct slug again, and save it again. And it is working for now.

My Question is How can all this mess have been created? what could have caused this? What can i do, to make sure this doesn't happen on any site that i develop. Or if such issue arrives again here what can i do?

Edit: We had to change wp_settings > permalink structure to 'custom permalinks' (to match the staging site's). And that might be the reason it got fixed. but we are not sure.

Also, is there any way to log all the events taken in WordPress to see what is being done, by who? I have used 'Stream' plugin but it only keeps the record that a page was edited or some general things were changed. But it doesn't tell what exactly was edited, or what option was changed.

Edit2: I have already tried and tested:

  1. theme/plugin/WP update
  2. clear cache (wp rocket, browser) both
  3. recreated .htaccess
  4. permalinks saved (without changing settings. earlier this was done a 100 times)

Edit3: wow this became a long question. pl. feel free to comment on how could i have explained the scenario in little words (if it was possible). also, are the tags i have given, the best possible tags for this scenario.

A half cooked WordPress website, using (a) Custom Permalink plugin (b) Poly_lang plugin (c) WP Rocket Pro plugin (no CDN) was assigned to us.

We noticed that Slugs of many pages were different in production site from the staging site. We were to match them as per the staging's (because they already had SEO ranking).

However, soon it dawned upon us that many pages were simply not getting staging's slugs. After changing its slug, when we tried visiting the page: (a) WordPress wither redirected them to home page (b) showed 404 error (c) missing lang_code in their address.

Another enigma is that it happened on some pages and some pages would easily change their slugs. We tried deleting the page (for All the languages), then recreating from scratch; and that worked for some pages, and some pages still couldn't change. Moreover, this approach magically worked if we deleted the pages two or three times again, and then recreated. But still for some pages recreating even 3 times didn't work either.

We were out of ideas. And today the issue is gone, automatically. We have no confirm idea how! Now, I can change the slugs, and WordPress would retain it. if it doesn't, I go back to edit panel, write the correct slug again, and save it again. And it is working for now.

My Question is How can all this mess have been created? what could have caused this? What can i do, to make sure this doesn't happen on any site that i develop. Or if such issue arrives again here what can i do?

Edit: We had to change wp_settings > permalink structure to 'custom permalinks' (to match the staging site's). And that might be the reason it got fixed. but we are not sure.

Also, is there any way to log all the events taken in WordPress to see what is being done, by who? I have used 'Stream' plugin but it only keeps the record that a page was edited or some general things were changed. But it doesn't tell what exactly was edited, or what option was changed.

Edit2: I have already tried and tested:

  1. theme/plugin/WP update
  2. clear cache (wp rocket, browser) both
  3. recreated .htaccess
  4. permalinks saved (without changing settings. earlier this was done a 100 times)

Edit3: wow this became a long question. pl. feel free to comment on how could i have explained the scenario in little words (if it was possible). also, are the tags i have given, the best possible tags for this scenario.

Share Improve this question asked Oct 15, 2024 at 13:08 Saad MansoorSaad Mansoor 1011 bronze badge 1
  • 1 This sounds like a caching issue combined with your permalinks - when you have stuff like this happening, turn off stuff like WP Rocket while you're working so it stops caching things. – Tony Djukic Commented Oct 15, 2024 at 20:35
Add a comment  | 

1 Answer 1

Reset to default 0

This is not a solution, but this works some of the times.

Try changing each and every relevant settings there is. Since we changed the permalink structure to 'custom permalink' the issue has been gone.

We were hesitant to change the permalink settings at first because that had caused all our global_colours to 'invalid'. However, if we hadn't had to change the settings, we might have been stuck in the problem still.

本文标签: