• Resolved stakabo

    (@stakabo)


    Hi all.

    I have 2 wpmu install on 2 different DB. one for the devolvement and one for production.

    Putting site online after the client approval was a pain so i made a script that:

    1. backup the site tables (wp_SITE-ID_posts, wp_SITE-ID_postmeta, and so on)
    2. Drop the productions site table
    3. Recreate the production site table by coping the dev site table.
    4. Update the new productions site table with the url of the production site. (wp_SITE-ID_options, wp_SITE-ID_posts, wp_SITE-ID_postmeta)
    5. Copy the dev site files over the prod server

    The script works great and after i run it. the site on the production server is an exact copy of what was on the dev server. great !

    I only have a small problem. After i run the script, some of the admin page will no longer load. for example, /wp-admin/edit.php will load, but not /wp-admin/post-new.php, or /wp-admin/post.php after updating a post.

    Is there any table i forgot to update ?
    Or maybe you have another strategy to sync 2 wpmu site ?

    thanx for any help

    I just made this shell script to sync 2 site on 2 difrent wpmu install.

Viewing 7 replies - 1 through 7 (of 7 total)
  • If your user ids don’t sync up, then your site admins may not have access to some areas of the admin. For the ones that have issues, check to see if the user has a role on that site.

    Thread Starter stakabo

    (@stakabo)

    wow, your a god.
    That seam to be the problem.
    No user have roles. I also notice that the wp_SITE-ID_options did not get updated. i had to change wp_SITE-ID_user_roles to reflect the new site id (wp_NEW-SITE-ID_user_roles).

    I got the tips from this article: https://sillybean.net/wordpress/migrating-single-wordpress-installations-into-multisite-networks/

    So, now, i can make new user, modify their role, but i still can’t load some pages in the admin section.

    Is there any other table i should look to update/change as well ?
    Where do wordpress keeps data about users and who can access witch site on the network ?

    thank for your help.

    user_meta table ??

    Thread Starter stakabo

    (@stakabo)

    hi again,

    I still have no clue what’s going on.
    Some of my admin page (those that will modify post or other options) will not load, and after a long delay, end-up on 404 page (with the site theme applied to it).

    https://aa2.9ieme.net/wp-admin/post-new.php :: page not found.

    i copied everything and tried everything i could think of. I updated the usermeta, the wp_{ID}_options > wp_{ID}_user_roles, wp_{ID}_options > wp_{ID}_upload_path,

    I tried to put new salts in the wp-config.php, but no help.

    Even if i try to copy from one site to another site on the same wordpress install, i still have the same problem.

    There has to be just a tiny thing I’m not seeing here.

    Duplicating a site on a WP Multisite install is much harder then what i expected. almost makes me want to go back to one install per site. well no, but still i really have to find a way to duplicated entire site. having to reconfigure site after i import/export them with the Tools> export / import does not carry over all settings (plugin/widget/menu) and it makes the task a lot longer then it used to.

    If you have any hint on what’s i’m missing here, let me know !

    Thank for earring my rant.
    hope to get back to you soon with anwser …

    Are you trying to copy one of the sites on the network to another site within the same network?

    Or are you moving from one install to the other?

    Thread Starter stakabo

    (@stakabo)

    Hey Andrea,

    I did try both. moving (or duplicating) from one network instal to another, and also just move it within the same install and both failed so far.

    i’ll try to do it again tonight.
    maybe luck will be on my side !

    thanx for your help Andrea and Ron. really appreciated.

    Thread Starter stakabo

    (@stakabo)

    Hey Andrea and Ron.

    after working on this for some time i finally found what the problem was.
    (and i feel kinda dumb for not finding it before …)

    I was duplicating the table using this:
    CREATE TABLE table_name SELECT * FROM old_table_name;

    but this does not duplicate the tables keys.

    What does the job is
    CREATE TABLE table_name LIKE old_table_name;
    INSERT INTO table_name SELECT * FROM old_table_name;

    with this, now everything works perfectly once you update the new table with the proper new URL and blog ID, file upload path and such.

    again, thanx for you support on this.

    i also started to rewrite this as a wp plugin.
    i first made this as a shell script to make sure moving all the files and DB would not timeout. (in case the site your moving is +300 MB, or with +1000 posts).

    buti think that if the site your trying to duplicate is not too big and your php install as decent memory, it should work fine as a plugin.

    i’ll come back and give you the link to download the plugin once i have a working prototype.

    i know this plugin could help manage site for any developer working on a WP network.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Some admin page no longer loading’ is closed to new replies.