This article is about moving a site to an internal folder of another site.
1. Transfer site files to a new folder.
2. Export the database, in the dump change the old domain to the new one (with the folder name).
For example, newdomainname.com/folder (Important! Do not put a slash at the end, you need just change olddomainname.com to newdomainname.com/folder and that’s it!)
Import the modified dump into an empty database. If it is not possible to make changes to the dump locally, upload the old dump to the server and recursively replace the old domain with the new one (with the folder name).
3. Edit the wp-config.php file, enter new data: database name, username, password for the database and the connection host.
4. Edit .htaccess, there you need to make 2 edits, according to this example:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /folder/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /folder/index.php [L] </IfModule> # END WordPress