[wp-trac] [WordPress Trac] #40140: upload_url_path doesn't seem to make any effect

WordPress Trac noreply at wordpress.org
Mon Mar 13 06:53:02 UTC 2017


#40140: upload_url_path doesn't seem to make any effect
-----------------------------+-----------------------------
 Reporter:  avibrazil        |      Owner:
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Media            |    Version:  4.7.3
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 An site of mine had '''http://site.com/articlefiles/''' as the place to
 receive uploads, equally it was '''/site/root/articlefiles''' on the
 filesystem, instead of '''/site/root/wp-content/uploads'''.

 Now I migrated the site into a multisite installation as site 2 and
 uploads are going into /site/root/articlefiles/site/2/ and all previous
 uploads in old posts are linked as
 '''http://site.com/articlefiles/site/2/something.jpg''', causing broken
 images and links cause they originally don't have the "site/2" part.
 Editing the post, these links and images do not have the "site/2" part
 either. WordPress is rewriting the URL dynamically when reading the posts.

 I want to keep compatibility with '''http://site.com/articlefiles/''' and
 '''/site/root/articlefiles''' without the "site/2" part. I was expecting
 '''upload_url_path''' on options table to be the solution but it doesn't
 work. I put there '''http://site.com/articlefiles/'''.

 How can I keep URL and path compatibility when migrating a single site to
 a non-primary site of multi site installation ?

 Thank you in advance

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40140>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list