Server Migration – Images no loading
-
So I had to migrate servers and all I have is the database and wp-content folder. After setting up a fresh instance of WordPress and multi-site, I copied all the DB tables across (wp_1_posts, wp_2_posts,….) and it all seems fine except for images/attachments.
Previously in a WordPress upgrade, things broke and installation was using a very old version of multisite. Part of it had to do with the blogs.dir folder which I believe is why the old .htaccess file had
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]Any help will be appreciated. As well as how to clean up the data itself.
Current .htaccess
RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # this was in the previous server - 1 #uploaded files #RewriteRule ^(.*/)?files/$ index.php [L] #RewriteCond %{REQUEST_URI} !.*wp-content/plugins.* #RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L] # this was in the previous server - 0 # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L]
The options_table (http://imgur.com/7F9a2aB)
upload_path : wp-content/blogs.dir/17/files
fileupload_url: http://e_____.com/t___/filesNew uploads go into files/sites/SITENUM/year/month (http://imgur.com/SBAYwKp)
Previously it when intohttp://e_____.com/t___/wp-content/blogs.dir/17/files/sites/17/2013/11/testBmp-domain_0.jpg
http://e_____.com/t___/wp-content/blogs.dir/17/files/2013/11/elc-11.jpgTo complicate matters, it seems we have both the following types of img links in the posts
<img src=”http://e_____.com/t___/wp-content/blogs.dir/17/files/2013/11/f1-11.jpg”>
<img src=”http://e_____.com/t___/files/2011/07/Rick-222×300.jpg”>
- The topic ‘Server Migration – Images no loading’ is closed to new replies.