23
May

Recently I came across this wordpress MU media upload problem while working with one of my client’s WPMU site. The main difference between WordPress single and WordPress MU is Redirection. WordPress never involves in redirection while wpmu is fully dependent to redirections.

The WordPressMU media problem is ‘when you upload media files to blog’s files directory it won’t displays in the post even after the successful upload. This happens because the media file uploaded to individual blog directory like

“wp-content/blogs.dir/o7/files/2010/05/img.jpeg” where the syntax is “wp-content/blogs.dir/blog id in #/files/year/month/mediafilename.ext”

When you update this image to your post, you will find the link as follows

“http://blog07.yoursite.com/files/2010/05/img.jpeg” . When you try to view the image in browser, WPMU redirects this link to blog’s particular files directory according to the blog id. So when you have problem in redirection the it affects the media upload feature of WPMU sub blogs.

Most of the folks using WPMU is in shared hosting have this problem. When you try to install WPMU first it will create a .htaccess.dist file, you can replace it with .htaccess file to solve this problem. If you don’t have that or problem in updating httpd.conf file given in WordPress documentation installation file you can update the following code in your .htaccess file.

Delete all content in your .htaccess file and replace it with the following code,

RewriteEngine On
RewriteBase /

#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>

If you still have problem in media-upload feature, check with your media-upload options in your admin tabs in wp-admin controls. set the minimum upload limit to some what high then previous.

For queries about this comment here….


Written by Sakthi Tharan (tharansakthi)
About Author: A professional blogger, writes on blogging and other various web trends and activities that relates to blogging. His articles are more strategical than being more technical.

Share

Related posts:

  1. WordPress MS (3.0 & above) Media Upload Problem
  2. WordPress MU Sub Domain, Wild Card DNS
  3. Speeding Up WordPress To Load Faster
  4. Writing WordPress Blog In Other local Languages
  5. Customizable WordPress Theme – Weaver 2010
  6. CRM For WordPress Internet Marketers
  7. Tired Of Downloading At Slow Speeds? This Freeware Will Help You
  8. How To Choose A Commercial Web Hosting Plan
  9. How To Choose A Free WebHost
  10. Blog Post Update To Twitter Tweets

To get regular updates to your mail Please enter your email address here

Delivered by FeedBurner. Privacy Guaranteed, We hate spam as you do.

Add reply

Freelance PHP Developer