[SmartCrawl Pro] SmartCrawl: Duplicate meta_key columns in wp_postmeta table

Hi,

I realize that our database of 1 000 posts (and 5 000 revisions) has table wp_postmeta size 350 MB.

So I investigate and I find duplicate rows with meta_key value "_wds_analysis". There are posts which have 10 rows with meta_key value "_wds_analysis". All such rows has about 13 000 characters.

There is 17 000 rows with meta_key value "_wds_analysis" – it is about 220 000 000 characters = 220+ MB of data.

Please how to fix it?

Thanks,

Jiri

  • Kasia Swiderska
    • Support nomad

    Hello Jiri,

    I’m sorry about this issue on your site.

    I have checked my site if I will see a similar problem – multiple _wds_analysis rows for one post, but I could not. Each post on my site has only one _wds_analysis row.

    Can I see your site’s settings? I will compare and see maybe I will be able to find what is causing this problem.

    To enable support access you can follow this guide here:

    https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-5

    Please respond in this ticket once access is granted.

    kind regards,

    Kasia

  • Patrick Freitas
    • Staff

    Hi Jiri

    Thank you for the access.

    I configured my SmartCrawl Pro using the same configuration of your website, also created some new posts and made some changed on other to have some post revisions to check if I got the same results, and I wasn’t able to do so, I see the only _wds_analysis per post.

    Wouldn’t you mind, please, send us some information and we can have a closer look?

    Note: Don’t leave your login details in this ticket.

    Instead, you can send us your details using our contact form https://premium.wpmudev.org/contact/#i-have-a-different-question:

    Subject: “Attn: Patrick Freitas”

    – Site login URL:

    – WordPress admin username:

    – WordPress admin password:

    – FTP/SFTP credentials

    Host:

    Username:

    Password:

    Port:

    – Database credentials

    Host:

    Username:

    Password:

    – Folder path to the site in question:

    – Link back to this thread for reference

    – Any other relevant URLs/info:

    Please, reply to the ticket once you have sent the information.

    Best Regards

    Patrick Freitas

  • Patrick Freitas
    • Staff

    Hi Jiri

    Thank you for the credentials.

    I can see the duplicated posts id on your database.

    It is happening because a plugin/theme is using the function add_post_meta() instead of update_post_meta().

    I checked our SmartCrawl plugin codes and made some tests on my end, it does not seem come From Smart Crawl.

    To performance a cleanup on your database you can follow this article:

    https://wordpress.stackexchange.com/questions/262038/delete-duplicated-wp-postmeta-record

    You need to make a small change on database table prefix once your database is not using wp_ on wp_postmeta.

    Note, Is Crucial run a FULL backup of your site and Database before taking any step.

    After performing the cleanup, add some posts, and check if the problem is gone, if it still happens you will need to run a plugin conflict test.

    Remember, is essential that you run this test in a staging site, if you can’t do it you must create a full backup.

    Please deactivate all plug-ins create some posts, and check if the problem is gone. If so, then enable all plugins one by one and find which one is creating the issue.

    If you still having this issue, could you do a theme test, much the same as the plugin test, but now you’re testing themes!

    Activate one of the default WordPress themes, like Twenty Sixteen or Twenty Seventeen.

    Here you will find more information on https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-2

    Let me know the results that you get,

    Best Regards,

    Patrick Freitas

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.