• HI,
    After migrate from one hosting to another I have probelm with create new post.

    First problem was with autoincrement in wp-posts table – it was disable and I cannot do anything. After adding auto-increment fot ID field it started working but wrong way.
    When I try to add new post it always open post to edit – post with ID = 1.

    I upsdated autoincrement value for wp-posts table to MAX(ID) +1 but it still don’t allow me to create new post only to edit post ID = 1 .

    When I try to edit another post it works fine.

    Thank You for help

    Michal

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Tellyworth

    (@tellyworth)

    There are probably other issues with your database schema. Either it wasn’t created correctly in the first place, or someone has changed it.

    What does SHOW CREATE TABLE wp_posts return?

    Thread Starter mmolinski

    (@mmolinski)

    HI,
    Below is result of query:
    CREATE TABLE wp_posts (
    ID bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    post_author bigint(20) unsigned NOT NULL DEFAULT ‘0’,
    post_date datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    post_date_gmt datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    post_content longtext COLLATE utf8mb4_unicode_ci NOT NULL,
    post_title mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
    post_excerpt mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
    post_status varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ‘publish’,
    comment_status varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ‘open’,
    ping_status varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ‘open’,
    post_password varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    post_name varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    to_ping mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
    pinged mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
    post_modified datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    post_modified_gmt datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    post_content_filtered longtext COLLATE utf8mb4_unicode_ci NOT NULL,
    post_parent bigint(20) unsigned NOT NULL DEFAULT ‘0’,
    guid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    menu_order int(11) NOT NULL DEFAULT ‘0’,
    post_type varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ‘post’,
    post_mime_type varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    comment_count bigint(20) NOT NULL DEFAULT ‘0’,
    KEY post_name (post_name(191)),
    KEY type_status_date (post_type,post_status,post_date,ID),
    KEY post_parent (post_parent),
    KEY post_author (post_author)
    ) ENGINE=MyISAM AUTO_INCREMENT=12765 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with Create new post’ is closed to new replies.