# Copy a site Wordpress into a subdirectory

**URL:** https://discourse.roots.io/t/copy-a-site-wordpress-into-a-subdirectory/16755
**Category:** bedrock
**Created:** 2019-10-03T23:46:56Z
**Posts:** 4

## Post 1 by @djjulianpro — 2019-10-03T23:46:56Z

1. Hello,

- I just got the Wordpress from a client wich was developped with Bedrock by another web agency. The site works well with a simple tree : config, vendor, www and the .env at the root directory and “[www.ydomaine.fr](http://www.ydomaine.fr)” as a domain name.

- My client wishes to have a development environment on [www.ydomaine.fr/dev](http://www.ydomaine.fr/dev) with the copy of the site. That’s why I made the following method :

- 
  - I made a copy on /www/dev

1. 
  - I modified the .env :

2. 
  - WP\_HOME=http://www.mydomaine.fr/dev/www

3. 
  - Add other prefixes : DB\_PREFIX=sitedev\_

4. 
  - I replaced all adresses of my base by :

5. 
  - siteurl : [https://www.mydomaine.fr/dev/www/wp](https://www.mydomaine.fr/dev/www/wp)

6. 
  - home : [https://www.mydomaine.fr/dev/www/](https://www.mydomaine.fr/dev/www/)

- But it doesn’t work : on the home page, the theme is not displayed and the login page redirects to the admin page.

- Would you have any ideas to help me please ? Did I forget something ?

- Thank you in advance for your help.

---

## Post 2 by @ng3 — 2019-10-04T19:14:40Z

Are you able to use Trellis for your deploys? If so, I would suggest telling your client that the dev site will be at [dev.mydomaine.fr](http://dev.mydomaine.fr), and then let Trellis handle all that for you. It’s honestly an amazing workflow - combine it with GitHub and you have the perfect system for handling multiple environments.

---

## Post 3 by @djjulianpro — 2019-10-04T20:09:49Z

Hello,

Thanks a lot for your help. The website is currently on a shared server on OVH.

What is the best method to make a copy of the website ? Should I take another site hosting ? Should I take a subdomain ? Can’t I do a simple migration, just like another Wordpress ?

Thanks again in advance

---

## Post 4 by @system — 2019-11-14T23:46:56Z

This topic was automatically closed after 42 days. New replies are no longer allowed.
