# Change the EDD Downloads URL Base

> Replaces /downloads/ in your product URLs with a word you choose, such as /plugins/ or /templates/, without defining constants in wp-config.php.

- Type: PHP
- Runs: Run everywhere
- Category: [Easy Digital Downloads](https://wpide.com/library/category/edd/)
- Requires: Easy Digital Downloads
- Tags: edd, permalinks, urls, seo
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/edd-change-downloads-slug/

## Code

```php
$wpide_edd_slug = 'plugins'; // New URL base.

add_filter( 'edd_download_post_type_args', function ( $args ) use ( $wpide_edd_slug ) {
    $args['rewrite'] = array_merge( (array) ( $args['rewrite'] ?? array() ), array( 'slug' => sanitize_title( $wpide_edd_slug ), 'with_front' => false ) );

    if ( ! empty( $args['has_archive'] ) ) {
        $args['has_archive'] = sanitize_title( $wpide_edd_slug );
    }

    return $args;
} );
```

## Notes

Visit Settings > Permalinks and click Save after activating, and set up redirects from the old URLs if the site is already live.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Change the EDD Downloads URL Base" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
