Problem uploading images

Multisite
3.4.1 wordpress

I redirected wp-admin with htaccess rules,
and renamed wp-content and plugins with via wp-config http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content
now I can no longer upload images.

Read More

when I try to upload an image it starts crunching but then either has an http error or says are you sure that you want to do this but then does not let me upload the image.

this is in .htacess

 RewriteEngine On
 RewriteBase /
 RewriteRule ^login$ wp-login.php
 RewriteRule ^index.php$ - [L]

 # uploaded files
 RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

 # add a trailing slash to /wp-admin
 RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

 RewriteRule ^([_0-9a-zA-Z-]+/)?private-admin/?$ $1private-admin/index.php?wdeb_on [R=301,L]
 RewriteRule ^private-admin(.*)$ wp-admin$1

 RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin/([_0-9a-zA-Z-]+).php?(.*)$ $1private-admin/$2.php?$3 [R=301,L]


 RewriteCond %{REQUEST_FILENAME} -f [OR]
 RewriteCond %{REQUEST_FILENAME} -d
 RewriteRule ^ - [L]
 RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
 RewriteRule  ^[_0-9a-zA-Z-]+/(.*.php)$ $1 [L]
 RewriteRule . index.php [L]

This is in wp-config
/* Changes to redirect wp-admin to private-admin folder */

 $redirect_url=$_SERVER['REQUEST_URI'];
 if(preg_match('/wp-admin/i', $redirect_url)) header('Location:    '.str_replace('wp-admin', 'private-admin', $redirect_url));

/** Change name of wp-config and plugins */
 define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/private-content' );
 define( 'WP_CONTENT_URL', 'http://mysite.com/private-content');
 define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/private-content/resources' );
 define( 'WP_PLUGIN_URL', 'http://mysite.com/private-content/resources');
 define( 'PLUGINDIR', $_SERVER['DOCUMENT_ROOT'] . '/private-content/resources' );

This is the image url path in network> settings>Sites>/>image upload path:
private-content/uploads

Suggestions on how I can fix this? Thanks.

Related posts

Leave a Reply

1 comment

  1. The issue was that half of the site still used the old wp-content for images under this method so I ended up changing the wp-admin doing a find and replace instead of a htacess redirect.