Merge multiple Wordpress to one

Source: Internet
Author: User

In the past, in order to separate the technical logs and life logs, I created two WordPress, and then added a post to be prepared. Recently, I wanted to create a digital one, as a result, it is naturally inconvenient to manage multiple WordPress instances. The upgrade, plug-in updates, and theme changes are too tired to handle. This time, I decided to merge multiple WordPress instances into one, by the way, change the original WordPress subdirectory to the root directory.

Merge idea: Use the WordPress Import and Export function.

Step 1: export all WordPress content as XML.

Step 2: Modify XML. Open it with a text tool and change the original blog directory to the root directory, that is, replace the main image path with the new path.

Step 3: copy the WP-content/uploads directory under each subdirectory to the new WordPress directory based on the modification in the previous step. It is best to use SSH commands. If you cannot use SSH commands, you can only use ftp. Of course, this step can not be changed, so you must keep the image file under the original file directory. At the same time, the 301 redirection mentioned at the end of this article cannot be used, or errors will occur.

Step 4: import the modified XML file to the new WordPress. When importing images, you do not need to import them because all the attachments have been changed to a new place in the previous step.

Now, we are done. Visit your new blog.

Note: If the aliases in the two log categories are the same, we recommend that you modify them before exporting them. Otherwise, they will be imported to the same category directory, in this way, you need to re-organize the data after the import.ArticleIf there are too many articles, it will be troublesome.

Duplicate log ID: WordPress automatically assigns the duplicate ID to the new one.

The last step is to make a 301 jump and use. htaccess in order not to affect Seo or to access the correct webpage for the original link. The specific statement is as follows:

Rewriteengine on
Rewriterule (. *) http://rovertang.com/#1 [R = 301, l]

Put this file under your original WordPress. The path here is to jump from the atomic directory to the root directory. If your new WordPress is installed in another subdirectory, modify it by yourself. Note: The reason why I want to remove the attachments in WordPress to the new WordPress is this jump, which causes the images to be kept in the original directory, however, this jump causes the image file to be transferred to the new address forever, but the new address does not actually exist, and errors will naturally occur.

Let's talk about the above duplicate ID problem. If you want a correct jump, you need to filter the duplicate IDs through the database, then write the old and new corresponding IDs to the jump file. I don't think this step is necessary, and I don't want it to be so troublesome.

Well, the method for merging multiple WordPress is so simple. Will it happen to you?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.