Installing a second WordPress in a subfolder

I recently worked on a project where the client wanted to move demo WordPress site within a subfolder of the main site. The main WordPress site is a WordPress directory website. The new second site is a magazine with a different identity. Normally, you put your demo in a subfolder like example.com/demo, and you can easily create a different look for that section. This is a scenario where you need a different WordPress instance or when you need completely independent from the main WordPress installation.

Here is a link to an article in the Codex.WordPress in it Own Directory.
It is a bit confusing so We have develop new WP ALL Backup Plus plugin to do this.

WP ALL Backup Plus gives you the tools you need to quickly and easily clone a WordPress site for rapid deployment elsewhere. You could move your WordPress website to a new domain, new host, new server – all with a single tool that does the job for you in a couple of minutes.

Create New Database for site2 (Create new user for database and give/grant all permission for this user also keep database information).

Upload backup file (zip) and installer file on server where you want to clone the site (i.e site2.com/demo). If you want move site in to subfolder then upload backup file and install.php (installer)in to subfolder.

Run the installer : open your browser then run install.php file.If you want to install second WordPress in to demo folder then Enter URL like http//www.site2.com/demo/install.php

If your second subfolder installation is successful, you may likely run into an issue when WordPress writes its Permalink (within the subfolder). The issue apparently has to do with the subfolder installation and how it sees the site root path. WordPress will normally write a .htaccess file in the installation directory, and that folder is usually the website root folder. Here is the applied solution: