mysql - Removing a wordpress multisite installation and preserving the database before migrate to nginx

I have a WordPress multisite installation, and I need to remove the multisite, and keeps just the site ID 5 (domainbr)

I have a WordPress multisite installation, and I need to remove the multisite, and keeps just the site ID 5 (domain/br) in the main address (domain).

So I follow this tutorial to remove WordPress multisite installation: /. After that I dropped wp tables post, terms, term_taxonomy etc, and changed the tables wp_5_ to wp_. My site became extremely slow to open pages, his aesthetic was greatly affected, images did not load, so I was informed about the serialized data in the database, and that I should not change the database manually.

I do not intend to migrate the multisite to NGINX, so I think I have 2 options:

Do a stand alone installation (domain/br in domain, and after redirect to /br), and stay with a single website. change the database tables from site ID 5 to the main site tables database (I mean keeps just one database working perfectly), and migrate a single website.

Which do you recommend, and can you provide references on how to do this?

p.s.: I'm disregarding the option of buying a plugin to do this, and learning to do at hand.

I have a WordPress multisite installation, and I need to remove the multisite, and keeps just the site ID 5 (domain/br) in the main address (domain).

So I follow this tutorial to remove WordPress multisite installation: http://premium.wpmudev/blog/uninstall-multisite/. After that I dropped wp tables post, terms, term_taxonomy etc, and changed the tables wp_5_ to wp_. My site became extremely slow to open pages, his aesthetic was greatly affected, images did not load, so I was informed about the serialized data in the database, and that I should not change the database manually.

I do not intend to migrate the multisite to NGINX, so I think I have 2 options:

Do a stand alone installation (domain/br in domain, and after redirect to /br), and stay with a single website. change the database tables from site ID 5 to the main site tables database (I mean keeps just one database working perfectly), and migrate a single website.

Which do you recommend, and can you provide references on how to do this?

p.s.: I'm disregarding the option of buying a plugin to do this, and learning to do at hand.

Share Improve this question edited Apr 2, 2019 at 5:31 phatskat 3,1741 gold badge18 silver badges26 bronze badges asked Apr 1, 2019 at 23:56 aguyfrombrazilaguyfrombrazil 113 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

You can try a couple of things. WordPress has a built-in Importer/Exporter you can find under the Tools menu:

The tool is a bit hit or miss, your mileage may vary.

Alternatively, you can do the following:

First, take backups of everything!!

It sounds like you already have, but do it again, just in case.

  1. Export only the wp_5_ tables from your current database to a SQL file.
  2. Next, create a fresh new WordPress single site. Don't add any content or anything, just set it up.
  3. Import the SQL file from step 1. into your single site database. Now, you should have both wp_ and wp_5_ tables.
  4. You have a couple of options now:
    • In your wp-config.php, change this line $table_prefix = 'wp_'; to $table_prefix = 'wp_5_';
    • OR: Run a query like this for EVERY table you want to migrate:
INSERT INTO wp_posts SELECT * FROM wp_5_posts;
-- ... etc, so for terms you would do
INSERT INTO wp_terms SELECT * FROM wp_5_terms;

In your wp-config.php, change this line $table_prefix = 'wp_'; to $table_prefix = 'wp_5_';

In this case, I need some tables from 'wp_', like users. So, what do you suggest? For example, create new 'wp_5_' tables to users, and them migrate the database with the second option that you gave me. I think this should work.

OR: Run a query like this for EVERY table you want to migrate: INSERT INTO wp_posts SELECT * FROM wp_5_posts;

Will not I have problems with date serialization doing this?

I know that the wp search-replace command does not generate this kind of problem, I was thinking of using it for this.

And about the images?

I do not know in which folder of wp-content I should export the images, and I do not know if I should do this with a predefined rule, for example, if the images are organized according to the upload date of them.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745635348a4637359.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信