There, change the WordPress Address (URL) and Site Address (URL), to match with the target folder – in below example, installation is moved from root folder to a sub-folder named v2.
URL settings updated with new folder
Then, using your file explorer for a local site (i.e. on XAMPP), or your FTP client (i.e. FileZilla) if the site is online, move the whole WordPress installation, all WordPress files, to the destination folder.
Moving installation files to new folder
2 – Change of directory only
Open the file index.php from WordPress folder, and find the following line :
Change it to match your new folder, as per below example :
./v2/wp-blog-header.php – if installation has been moved in a sub-folder
../[folder]/wp-blog-header.php – if installation has been moved in a parent folder
Index.php settings updated with new folder
3 – Result
You can now try again to access your with the new URL you have entered in the first step !
WordPress accessed from new URL
It might not work directly on your browser when trying to access it, for cache reason. In case it doesn’t, try accessing the URL with another browser, it will correct itself after the cache will have expired.