Chris Farrell Membership
Acronis True Image
AVG PC TuneUp
This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies. Find out more.

How To Change Default WordPress Uploads Folder

 Posted by  Add comments
 

Change Default WordPress Uploads Folder

Change Default WordPress Uploads Folder

How To Turn Off Post Revisions And Autosave In WordPress

Note: This tutorial is not for beginners. Use it only if you know what you are doing.

 

The new Media Uploader in WordPress 3.5 was an innovative change. That change also removed the option to change the upload directory path from Settings. The reason for removing this option from the UI was;

  • it was not a commonly used option, and
  • it had the potential of creating chaos if the user accidentally changes it.

In this post we will show you how to change the default media upload location in WordPress.

Why Change the WordPress Default Upload Directory

Why would you want to change the WordPress default upload directory? Well, there are several good reason for changing the default upload directory in WordPress, including;

  • it makes it possible to host images on a subdomain to increase performance.
  • to make backups more efficient.
  • to create a different URL structure and organization for your media files.

Prior to WordPress 3.5 you could change the upload directory path from the Settings menu in the dashboard. Unfortunately, that option is no longer available.

How to Change the Default Media Upload Directory

To change the default media upload directory you need to modify your wp-config.php file, located at the root of your WordPress installation. Open the file and add the following code:

// This path can not be absolute.
// It is always relative to ABSPATH
// ABSPATH refers to the directory in which WP is installed.
define('UPLOADS', 'wp-content/uploads');

If the directory you are defining does not yet exist, WordPress will automatically create it as long as wp-content is writeable. Otherwise you will need to create the directory yourself via FTP and ensure the new directory is writeable.

Change Upload Organization

Don’t forget stipulate how WordPress uploads are organized in Settings > Media. Check or uncheck the box next to “Organize my uploads into month- and year-based folders”.

I recommend changing your file organization so all your media files go into one folder. This not only simplifies your URLs but also enables you to see all of your files in one place via FTP instead of having to search through multiple month and year directories.

Source: Function Reference /wp_upload_dir – WordPress Codex


KingSolutions.org.uk is hosted on JustHost

 Leave a Reply

(required)

(required)

88 queries in 0.784 seconds (Child).