admin管理员组

文章数量:1122846

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.

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.

Share Improve this question edited Mar 3, 2015 at 18:14 Peter Westerlund asked Mar 3, 2015 at 15:13 Peter WesterlundPeter Westerlund 1,0675 gold badges14 silver badges31 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

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.

本文标签: theme developmentDuplicate WordPress site to subdirectory but use same db