Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix WordPress creating wrong url for images in subdomain

Discussion in 'Misc WordPress Requests' started by WordPress.org Forums », Oct 31, 2017.

  1. WordPress.org Forums »

    Guest

    WordPress creating wrong url for images in subdomain, by

    I am setting up a WordPress site and am having problems with images in a subdomain. The WordPress installation is in a subdirectory.
    http://www.mydomain.uk/directory-name

    and the subdomain is

    http://images.mydomain.uk/originals

    Originals is a folder on the subdomain.

    I have changed wp-config.php to



    define(‘UPLOADS’, ‘../images/originals’);
    inserted just above the line that says require_once(ABSPATH.’wp-settings.php’);.

    and in options.php

    Store uploads in this folder
    ../images/originals

    Full URL path to files
    http://images.mydomain.uk/originals

    The images are going into the right place and an image displays if I manually type the url in to the browser address bar.
    http://images.mydomain.uk/originals/filename-300×158.jpg

    However when I insert an image in to a page the image url becomes
    http://www.mydomain.uk/directory-name/../images/originals/filename-300×158.jpg
    This is how it is inserted in the database guid field. Although it does work it is not what is wanted and defeats the point of the subdomain.
    Any suggestions?

    WordPress creating wrong url for images in subdomain
     
    #1

Share This Page

Web Hosting