WordPress creating wrong url for images in subdomain
-
I am setting up a WordPress site and am having problems with images in a subdomain. The WordPress installation is in a subdirectory.
https://www.mydomain.uk/directory-nameand the subdomain is
https://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 https://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.
https://images.mydomain.uk/originals/filename-300×158.jpgHowever when I insert an image in to a page the image url becomes
https://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?
- The topic ‘WordPress creating wrong url for images in subdomain’ is closed to new replies.