How to move 4000+ custom posts in a new custom table? Please help

Support MB Custom Table How to move 4000+ custom posts in a new custom table? Please help

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #41221
    Nitesh KumarNitesh Kumar
    Participant

    Hey Support, 

I am using Metabox with Metabox AIO on a website built using WP Astra Theme + Elementor Pro plugin.

    The website has 4000+ custom posts which was first built using PODs( https://wordpress.org/plugins/pods/ ) but then I migrated to Metabox 4-5 months ago. 

All seems good but I am lately getting high CPU and High Memory usage multiple times. So, I think it might be happening due to a huge WP_Post_meta table. 



    So, I am planning to use MB Custom Table plugin ( https://docs.metabox.io/extensions/mb-custom-table/ ) to separate custom fields to a different table than default WordPress meta table. 

However, being non-tech user, the process seems very tough considering I will have to first move all my existing custom fields to a new custom table and then delete old data.

    I read this guide - https://metabox.io/move-custom-fields-data-to-custom-tables/ and also watched video multiple times. But few things are not clear. So, please help me with this.

    To get better help, I am sharing these data for consideration:

    Example Website URL: customwp.com
    Custom Post Type name: Tool
    Custom Taxonomies Name: Platform
    Two Custom Field Groups - 1. For Platform and 2. For Tools Each of these field groups have dozens of custom fields.

    For example, ‘For Tools’ group have custom fields like ‘Tool Summary’ , ‘Tool Link’ etc. and ‘For Platform’ group have custom fields like ‘Platform Excerpt’ and ‘Platform Link’ etc.

    As I said I am using WP Astra theme with a Child theme name ‘Roka’

    In this guide - https://metabox.io/move-custom-fields-data-to-custom-tables/ I have doubts primarily in STEP-2 and beyond.

    The function code starts with

    function estar_child_data_company() {

    So, what will be the code in my case? Will it be

    function WP_Astra_child_data_company() {

    Or

    function Roka_child_data_company() {

    Do I need to write Parent Theme Name or Child Theme Name and how? Should I write WP_Astra or WP Astra while writing the theme name, if it’s parent theme?

    The given code at https://metabox.io/move-custom-fields-data-to-custom-tables/ only provides the example for post_type ( companies ) but not for Taxonomies. What code should I write for custom taxonomies data?

    Please understand that I am no coder and have no experience of understanding these things. So, I need to follow exactly what steps I am being asked to follow. 

So, can you please look at my example ( with custom post type, custom taxonomies and custom fields name ) that I have used above and give me exact code that I should run under functions.php? I am repeating my example once again -

    Example Website URL: customwp.com
    Custom Post Type name: Tool
    Custom Taxonomies Name: Platform
    Two Custom Field Groups - 1. For Platform and 2. For Tools Each of these field groups have dozens of custom fields.
    For example, ‘For Tools’ group have custom fields like ‘Tool Summary’ , ‘Tool Link’ etc. and ‘For Platform’ group have custom fields like ‘Platform Excerpt’ and ‘Platform Link’ etc.

    I am using WP Astra theme with a Child theme name ‘Roka’

    Also, as I said I have 4000+ custom posts which I need to move. So, how do I need to run this code again and again? Please help me understand the process better.

    Thank you.

    #41229
    PeterPeter
    Moderator

    Hello,

    >> So, what will be the code in my case?
    You don't need to change the function name, just copy it to your theme or child theme folder. After migrating data, you can delete the code then.

    >> Do I need to write Parent Theme Name or Child Theme Name and how? Should I write WP_Astra or WP Astra while writing the theme name, if it’s parent theme?
    You can add the code to the main theme or child theme, both of them are ok.

    >> The given code at https://metabox.io/move-custom-fields-data-to-custom-tables/ only provides the example for post_type ( companies ) but not for Taxonomies.
    You can change the post type to your post type (tool). But for the taxonomy, the code will be different. Because it is beyond our scope of support to provide a custom code for your specific needs. You can contact us here to request a customization service https://metabox.io/contact/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.