Wordpress - Subdomain for Images

Hi everybody,

I have set up a subdomain (images.example.com) to serve images for example.com.

However, I’m running into some problems that I don’t know how to solve…

No problem to change the upload_url_path in Wordpress Admin.
Media Library showing the new path immediately.

I duplicated all pictures on images.example.com, and would now expect that the media library shows them.

Unfortunately, no joy.

I tried to upload new images. Again… no joy. The upload looks ‘normal’, Wordpress needs some time, but I cannot find the uploaded images anywhere, not in Wordpress uploads, nor on the subdomain.

I guess that there may be something I have missed with the A record or the CNAME record, or the .htaccess file, or something else… I do not know.

Any help you can provide would be gratefully appreciated.

Are you running the Wordpress domain and the images sub-domain under the same or differnt users on the server? Specifically if you go to manage domains in the dreamhost panel, look at the web hosting column and see what user names are listed there?

I put them both under the same user name. However the plan is to move the subdomain to a content management delivery service later. Something like Amazon, or Dreamhost has this too I believe.

But first I need to make it work.

“Different” is what would create the problem I had in mind.

Have you tried logging in to that user via ssh and from your home directory using find

[servername]$ find . -name example.jpg

LakeRat, now you are talking a little too technical to me…

How do I try to log in with the code you provided?

Here is a quite helpful article on this topic: https://surpriseazwebservices.com/serve-images-from-sub-domain-in-wordpress/

What this guy is talking about is that after a sub-domain has been created the wp-content/uploads folder needs to be setup as document root. This basically means that the URL pointing to yoursite.com/wp-content/uploads/2014/06/image.png will also be pointing to img.yoursite.com/2014/06/image.png

I checked Dreamhost’s Wiki, and Forum , and everything… I cannot find anything where to set up the document root.

For this part, on “manage domains” in the panel edit the subdomain, and change what dreamhost calls the “web directory”, to the path to your uploads directory.

FYI that is based off this paragraph in his instructions, and I didn’t go further in his article.

The confusion seems to be dreamhost calls document root, the web directory instead