Uploading or Posting Pictures in WordPress WPMU

To change the default image upload folder:

1) If you have access to superadmin for a WPMU website network and you want to change a single blog to use year/month:

My Sites->Network admin->Sites->Settings->scroll down to “Uploads Use Yearmonth Folders”. 1= yes year/month, 0 = no year month, instead upload to /siteid/files/

When the problem remains that you have the uploaded files going into a /year/month subdirectory, there is a checkbox in the Admin->SettingsĀ  for not using the year date. However if you are using WordPress MU and you always want the uploads to not be deeply nested in a bewildering array of year/month folders, you can override this setting for all of your MU blogs, here’s how:

2) If you ftp access and want a plugin which will set uploads to year/month off for all new sites:

Add this code to a file called something like YearMonthUploadsOff.php to your wp-content/mu-plugins folder:

add_action('wpmu_new_blog', function($blog_id){
  switch_to_blog($blog_id);
  update_option('uploads_use_yearmonth_folders', false);
  restore_current_blog();
});

 

When you set Year/Month uploads to 0 (off)
The files will go to: wp-content/blogs.dir/files/" );
How to tell which upload directory your individual blog in WordPress MU is in:The /wp-includes/blogs.dir/ directory contains lots of numbered folders like 11, to determine which blog this folder belongs to go to your database and find the table for wp_blogs and this one will cross reference the blog names with the respective numbers.

About file uploads From a WordPress forum comment by a user sacredpath on:

When creating and uploading an image to wordpress.com here are some basics worth remembering:

(1) Be sure your image is one of these file types – jpg, jpeg, png, gif (Note that bmp’s cannot be uploaded due to size).

(2) Do not use anything in the file name except letters and numbers. Use no spaces, no dashes, no underscores, or any type of special character or punctuation, except for the dot between the file name and the extension. Also make sure that the file name has an extension.

(3) If you are using iPhoto, then use the “export” function under the file menu to export the image to your desktop before trying to upload it to WordPress.

(4) If you are not using the image in thumbnail size, make sure that the image is not too wide for the post area in your particular theme. You can find maximum image widths for the most popular themes here: http://faq.wordpress.com/2006/09/25/how-big-can-my-images-be/

(5) Optimize your images so that your blog pages will load faster. See http://faq.wordpress.com/2006/05/08/optimise-your-images/

(6) How to upload pictures in posts: http://faq.wordpress.com/2006/07/16/how-do-i-upload-pictures/

(7) How do I get text to go around a picture? http://faq.wordpress.com/2006/05/29/how-do-i-get-text-to-go-around-a-picture/

(8) How do I upload larger pictures? How to increase the file size limit on uploads with WordPress.

Leave a comment