- This topic is empty.
-
AuthorPosts
-
May 21, 2024 at 5:29 am #24982
Peter
Guestwithout using premium plugins or something, what is the easy way ?
May 21, 2024 at 5:35 am #24984Willie
GuestI think All-in-one Migration can export a subsite and then import to single site but yah, pretty sure that is a premium add-on.
May 21, 2024 at 5:38 am #24986Joseph
Guestwithout using premium plugins or something, what is the easy way ?
It depends slightly on whether you want to export the “main” site in the Multisite network or a different subsite. If the main site, it’s a bit simpler. Because the media uploads are probably already correct i.e. in the correct folders like
/uploads/2024/instead of/uploads/sites/3/...or whatever.If the media files are NOT correct, you should copy and paste the media uploads from the given subdirectory under
/sites/and into the normal directories as mentioned.After that, remove any Multisite rules in your
wp-config.phpAfter that, delete any tables in MySQL that are only for Multisite like:
wp_blogs wp_blog_versions wp_registration_log wp_signups wp_site wp_sitemeta wp_sitecategories (only, if exist)May 21, 2024 at 5:53 am #24987Joe
GuestAfter your media uploads are correct, and your
wp-config.phpis correct (all settings for Multisite are removed in that file) so the last step is ensuring that your remaining WordPress user(s) have Administrator permissions in the single site.You can run
wp user listusing WP-CLI to get a list of current users.Then, run
wp user set-role 1 administrator(change1to be the correct ID number of the user you want to change).After that you can clear all caches as needed and refresh the site.
Helpful: https://gridpane.com/kb/how-to-reset-wordpress-user-roles-with-wp-cli/
May 21, 2024 at 5:57 am #24988Juan
GuestSome of your plugins might be disabled during this process so just visit the Plugins page in WP Admin and reactivate plugins if necessary.
Also if you need to search/replace URLs in the database you can use WP-CLI:
wp search-replace https://oldsite.example.com https://example.com --all-tablesMay 24, 2024 at 5:27 am #25030Jose
Guestjust curious, is there a way to automate this in a script?
-
AuthorPosts