Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter webpublishingcom

    (@webpublishingcom)

    Thank you Sami for your answer.
    The way I did it is by:

    1. first exporting all the custom permalinks URL via phpMyAdmin using the code provided in another post and saving to an xlsx file:

    SELECT p.ID, p.post_title, pm.meta_value AS permalink FROM wp_posts AS p LEFT JOIN wp_postmeta AS pm ON (p.ID = pm.post_id) WHERE pm.meta_key = “custom_permalink”

    2. Then I installed a plug-in called EXPORT ALL URLs
    3. I temporarily disabled the CUSTOM PERMALINKS plugin
    4. Used EXPORT ALL URLs to export all the built-in URLs with post ID and Titles as a .csv file

    At that point you have a couple of options.

    Option 1
    Merge the content of the two files in XLSX, order by post ID and find the mismatch. You can then use the XLSX file to build the content for your htaccess redirectMatch file.

    Options 2
    Import the 2 files as 2 separate tables in MS Access and build a query that will display only posts where the CUSTOM PERMALINKS URLs and built-in URLs are different. Then export the file to XLSX so that you can add the necessary content to turn it into a 301 redirectMatch

Viewing 1 replies (of 1 total)