Duplicate WordPress site to subdirectory but use same db?

I have tried to just copy the whole root folder into a subdirectory. I understand the .htaccess file has to be changed. But can't get it to work right.

Is it something more than changing the htaccess file I'll have to do to make this possible?

As I said in the question, I want to use the same database. So I can't change any URL's in the database.

Edit: I have figured out that the site actually is going in to the directory, but then is redirecting back to the root again. I changed the site's url with WP_SITEURL and WP_HOME in wp-config.php-file. But nothing happens, the site is still redirecting back.

Topic testing htaccess theme-development Wordpress

Category Web


http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install

You have to COPY the index.php ot to the root and edit it to add the sub dir path.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.