The database is broken

The main site (root node) won't allow me to post or create categories
I did once make a change to the database though. Editing the wp_users table, the id's. Primary keys
The only problem is that it has almost 2000 posts. When I transferred the posts into a subsite, all the users weren't linked to their posts anymore cause the ID keys changed. I could try and reinstall, but is there a better way to handle users content?

  • Nastia
    • Support Rock Star

    Hello Sam

    Hope you are doing well!

    I've checked the database from the phpMyAdmin and some of the main tables from the main site are missing.

    The tables that are responsible for the posts categories are wp_terms, wp_termmeta and wp_term_taxonomy.

    After a closer look I see the wp_terms and wp_term_taxonomy tables are missing.

    If you have a backup, please try importing these two tables into the database. In case you don't have a backup, I am afraid you will need to re-install WordPress multisite.

    Let us know how it went!

    Kind regards,

  • Dimitris
    • Support Star

    Hey there Sam,

    hope you're doing good today! :slight_smile:

    The best way to manually create these tables, is to create a new WP multisite installation and add some dummy content in there, so you can inspect these tables and take notice how they setup their tables.
    For example the _terms table includes the categories names and slugs:

    Another workaround, would be to use the default WP import/export functionality to migrate these posts (along with their attachments and authors) in a fresh WP multisite installation.
    Here's a relevant article from our blog:

    Hope that was some help!
    Warm regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.