# Custom plugins, uploads & themes directories

**URL:** https://discourse.roots.io/t/custom-plugins-uploads-themes-directories/29201
**Category:** bedrock
**Created:** 2025-02-03T20:05:19Z
**Posts:** 1

## Post 1 by @Ahmad_Karim — 2025-02-03T20:05:19Z

I tried setting up custom plugins, uploads & themes directory but I am not getting the expected output. In my `./config/application.php` I added this:

```
// Define theme directory and URL if THEMES_DIR is set in .env
if (env('THEMES_DIR')) {
    Config::define('WP_THEME_DIR', $webroot_dir . '/app/' . env('THEMES_DIR'));
    Config::define('WP_THEME_URL', Config::get('WP_HOME') . '/app/' . env('THEMES_DIR'));
}

// Define plugin directory and URL if PLUGINS_DIR is set in .env
if (env('PLUGINS_DIR')) {
    Config::define('WP_PLUGIN_DIR', $webroot_dir . '/app/' . env('PLUGINS_DIR'));
    Config::define('WP_PLUGIN_URL', Config::get('WP_HOME') . '/app/' . env('PLUGINS_DIR'));
}

// Define uploads directory if UPLOADS_DIR is set in .env
if (env('UPLOADS_DIR')) {
    Config::define('UPLOADS', 'app/' . env('UPLOADS_DIR'));
}
```

And in my `./.env` I added these values:

```
# custom directories for plugins, themes & uploads
THEMES_DIR='static/theme'
PLUGINS_DIR='static/addon'
UPLOADS_DIR='static/media'
```

When I upload a file in wp-admin it adds wp to the url `http://site.test/wp/app/static/media/2025/02/img.png` instead `http://site.test/app/static/media/2025/02/img.png`

Is there an offical bedrock documentation to setup custom directories for uploads, plugins & themes?
