admin管理员组文章数量:1026156
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 badges2 Answers
Reset to default 1You 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.
- Export only the
wp_5_
tables from your current database to a SQL file. - Next, create a fresh new WordPress single site. Don't add any content or anything, just set it up.
- Import the SQL file from step
1.
into your single site database. Now, you should have bothwp_
andwp_5_
tables. - 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:
- In your
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.
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 badges2 Answers
Reset to default 1You 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.
- Export only the
wp_5_
tables from your current database to a SQL file. - Next, create a fresh new WordPress single site. Don't add any content or anything, just set it up.
- Import the SQL file from step
1.
into your single site database. Now, you should have bothwp_
andwp_5_
tables. - 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:
- In your
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.
本文标签: mysqlRemoving a wordpress multisite installation and preserving the database before migrate to nginx
版权声明:本文标题:mysql - Removing a wordpress multisite installation and preserving the database before migrate to nginx 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745635346a2160414.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论