Change WordPress Media Upload Directory - WordPress Tips, Tricks Every Serious Blogger Must Know

News Ever


Change WordPress Media Upload Directory - WordPress Tips, Tricks Every Serious Blogger Must Know

Change WordPress Media Upload Directory

If you want to change your media upload directory, you can easily do that by adding a line of code to your wp-config.php file.

For example, let’s say you want to change your upload directory to a folder called “media” located in the WordPress’s root installation directory, we’ll add this code right after require_once( ABSPATH . 'wp-settings.php' ); in the wp-config.php file:

define('UPLOADS', 'media');

From now on, all media files you upload will now go to the “media” folder.

NOTE: It’s advisable to do this on a freshly installed WordPress site. However, you can still do this on an already existing one, provided you know what you’re doing. This is because your old media files won’t magically move to the new folder.

As a result, when you do this on an existing WordPress installation, while your old images will still work properly in your posts/pages, they won’t appear properly in the media library. To fix this, you will have to move your old media files to the new directory and then update your database to reflect these changes, but that’s a topic for another article.

Post a Comment

  • Latest Biss Key + Frequency
    • NHL Service - 10762 V 28800 (7E) - Biss : 12 24 01 D3 11 4B 97 F3 
    • Varzish Sport HD - Yahsat 1A Satellite - Biss Key: 12 34 00 46 EB CD 00 78
    • Bein Sport - Eutelsat 16A Satellite - Biss Key: 12 24 01 D3 11 4B 97 F3
    • Discovery HD UK / Sky One HD - 12188 H 29500 8/9 - Astra 28E
    • Fox Sports Eredivisie 1 HD - 12073 H 30000 - Eutelsat 9E
      • BBC Earth - 11064 V 27500 - Eutelsat 25E
      • BBC Red Button HD 2/3/4/5/6 - 12421 H 27500 2/3 - Astra 28E
      • beIN SPORTS HD NEWS 12604 H 27500 2/3 Nilesat 7W
      Cookie Consent
      We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
      It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
      AdBlock Detected!
      We have detected that you are using adblocking plugin in your browser.
      The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
      Site is Blocked
      Sorry! This site is not available in your country.