• Resolved mrpritchett

    (@mrpritchett)


    I have been reading about image upload problems with multisite, but could not find the exact issue I am having.

    I am taking a single wordpress install at sub1.domain.org and putting it underneath a wordpress network that the toplevel domain is domain.org. sub1.domain.org retains its original address at sub1.domain.org but is now in the network. In order to get the content (posts, pages, users, images, etc) from the original subdomain install I performed an export. Then, I added the site to the network, changed DNS to reflect the change, and began to import once DNS had propagated. The posts, pages, and users all import perfectly. But my images do not. I followed the instructions at https://code.ipstenu.org/2010/moving-your-images-for-multisite/ but this did not do anything either. The files are in the right place (I moved them myself), wordpress seems to have the right path on the live site, but no joy.

    Any thoughts?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mrpritchett

    (@mrpritchett)

    Solved!!! Problem ended up being in .htaccess!
    Changed from:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]

    to

    #Wordpress Multi site
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    #END WordPress Multi Site

    All images now resolve properly!

    Yes the multisite htaccess rules *replace* the original ones you had in there. not in addition to. ??

    thanks mrpritchett!!!

    Your solution works perfect to me.

    Thanks for sharing

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Importing images path broken’ is closed to new replies.