Title: Changing DocumentRoot
Last modified: December 14, 2020

---

# Changing DocumentRoot

 *  [masahiro114](https://wordpress.org/support/users/masahiro114/)
 * (@masahiro114)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/changing-documentroot/)
 * Hi I am Masa. I recently have changed Apache DocumentRoot for wordpress like 
   the following.
 * > Old: DocumentRoot /var/www/home/www/{sitename}
   >  New: DocumentRoot /var/www/
   > home/users/{user.id}/www/{sitename}
 * I copied all files including wp-core files from Old DocumentRoot to New DocumentRoot
   and checked the site is working.
    However, when I install plugins, it uploads
   to Old DocumentRoot like /var/www/home/www/{sitename}/wp-content/plugins.
 * In order to fix this problem, I have tried these things.
 * > Changed recently_edited’s path and the word count -> didn’t work
   >  Added define(‘
   > WP_PLUGIN_DIR’, dirname(__FILE__) . ‘/wp-content/plugins’ ); -> didn’t work
 * How can I change the wp plugin upload directory to like /var/www/home/users/{
   user.id}/www/{sitename}/wp-content/plugins?
    Thank you for your help in advance.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [Dion Hulse](https://wordpress.org/support/users/dd32/)
 * (@dd32)
 * Meta Developer
 * [5 years, 5 months ago](https://wordpress.org/support/topic/changing-documentroot/#post-13789867)
 * Hey [@masahiro114](https://wordpress.org/support/users/masahiro114/),
 * Check what upload directory is set in your WordPress dashboard under Settings-
   > Media. It sounds like that might still be set to the old directory.
 * If the upload directory doesn’t show there, you can look at [https://example.org/wp-admin/options.php](https://example.org/wp-admin/options.php)
   and look for `upload_path` which should just be set to `wp-content/uploads`
 *  [a2hostingrj](https://wordpress.org/support/users/a2hostingrj/)
 * (@a2hostingrj)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/changing-documentroot/#post-13789872)
 * [https://wordpress.org/support/article/moving-wordpress/#if-you-forget-to-change-the-locations](https://wordpress.org/support/article/moving-wordpress/#if-you-forget-to-change-the-locations)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Changing DocumentRoot’ is closed to new replies.

## Tags

 * [apache](https://wordpress.org/support/topic-tag/apache/)
 * [documentroot](https://wordpress.org/support/topic-tag/documentroot/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 2 replies
 * 3 participants
 * Last reply from: [a2hostingrj](https://wordpress.org/support/users/a2hostingrj/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/changing-documentroot/#post-13789872)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
