简体   繁体   中英

Move WordPress site from example.com/dir to example.com (a stock WordPress theme already exists on example.com)

None of the guides I found mention how I delete the existing content on example.com so I'm only left with what's now on example.com/dir but at the URL example.com .

When I try change it in Settings → General → Change URL, it destroys the website on example.com/dir , but nothing happens on example.com .

What I want is to take our testing site (on example.com/dir ) to production page (on example.com ).

I'm new to WordPress, but as I see it I can't delete the main directory through FTP and just move the testing directory to the main directory, but that is required to move it.

Make sure you have a backup of the site before deleting anything. Since there is a subdirectory site within the main site then to delete the main site (to make room for the subdirectory site to be moved to there) you will want to make sure you are deleting the WordPress installation for just the main site. So the WordPress files and folders that are specifically for the main site. Most likely that would be all files and folders in the web root of the main site besides the folder that the subdirectory site is within.

Once you have the main site cleared out then there are several services and plugins that can help migrating the subdirectory site to the main site's location. Here's a few I am familiar with and have seen others talk about:

magicmigration.com - has nothing to install (no plugin) and is automated

all-in-one wp migration - has a site size limit of I think 512MB without paying for pro, have to install a plugin to site

duplicator - free but you have to install a plugin to the site and can get hit hard by budget hosts, also has a pro version that can be paid for

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM