Teach you to migrate WordPress to a subdirectory

  
I used WordPress in the root directory before. Although it is very convenient to build WordPress, it will make the root directory very confusing, especially when setting up other sites. It is very convenient to migrate WordPress to subdirectories without changing the site address. Not troublesome. The method can refer to the official document "Place WordPress files in a separate subdirectory". The migration method creates subdirectories, such as wordpress into the wordpress background settings - regular, set index.php and .htaccess to new addresses, such as http://www.itoldme.net/wordpress, the site address (URL) does not need to be modified. Cut all WordPress files into the wordpress directory and copy index.php and .htaccess to the root directory to edit index.php, require('./wp-blog-header.php'); and change to require('./wordpress/Wp-blog-header.php'); where wordpress is your subdirectory. At this point, the site migration is complete. The new background address will add subdirectories, such as http://example.com/wordpress/wp-admin/Matters: If the image is placed in WordPress, since WordPress uses an absolute path, the new image path will also change, and the subdirectory name will be added before wp-content, such as www.itoldme.net/wordpress/wp-content/uploads/. The image path referenced in the article needs to be modified by modifying the database. If you don't have the sql statement, you can use the plugin Search & Replace to replace www.itoldme.net/wp-content/uploads/with www.itoldme.net/wordpress/wp-content/uploads/, as shown outside the wall. Ladder to migrate wordpress to subdirectory 1 If cd Super Cache's CDN function is enabled, you need to add a subdirectory to the site address Off-site URL, as shown in this article from [System Home] www.xp85.com
Copyright © Windows knowledge All Rights Reserved