• I’ve got a self-hosted WordPress site through Dreamhost. I’ve got a lot of (low file size) images on my site that are currently all hosted through Photobucket. I’m tired of fighting that site and would like to go with a self-hosting option. However, I don’t like the way the WP Media Library works. What I’d like to do is create a folder or subdomain on my own Dreamhost server to host all the files and manage them over FTP. But I’ve got a couple questions about how this works.

    1. I’m able to create a directory within my WordPress folder and add images there. So if my site is https://mydomain.com then I added a directory within the mydomain-com directory called images. An image there is linked as https://mydomain.com/images/picture01.jpg. However, I’m worried that this directory could get deleted at some point through an update or something. Is this folder safe where it is? Or is it bad to create my own directories within my WordPress site’s directory?

    2. Another option I tried was to create a sub-domain https://images.mydomain.com. However, when I added photos there (e.g., https://images.mydomain.com/picture01.jpg), when I try to look at the photo or hotlink to it, I get a “page not found” error. So it seems as though a WordPress install at a domain takes over any other possible subdomains. Is this correct? Is there any way to get a subdomain to work because I feel like this is my best option if option #1 won’t work.

    I’ve been doing this for a few years, but I’m still a bit of a novice, so I appreciate any help you all could give me. Thanks in advance!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @ben4567894313148,

    Happy to know your story, About question #1, of course you can create any folder and insert images into the folder, it is your right, if you have right permission settings and there are no problem in your scripts, I guess it is safe and if you do not delete it, they will not be deleted automatically, DH will not remove them of course because you are their customer. If you use wordpress to process images, a good thing is there are many features, for example, thumbnail, this means open your pages more faster, of course there are a few php open source scripts which will “generate” thumbnail in their cache folders so it can works well too, but it need you add these URL manually, by default wordpres will process these steps, also there are many images plugins, which is based on wordpress API, so if you use your folder, maybe this will not work.

    Please note, worpdress scripts allow you change your content folder, but it seems this is not match your idea?

    About question #2:
    There are a few maybe reason, for example, is you meant you create a new site on your sub domain? If so in DH, I remember it will request you enter a new folder to hosting your sub site, so if you use https://images.mydomain.com/picture01.jpg, it is not from the main domain site, right?

    Actually, there are a few CDN plugins, which can setting your sub domain to a sub folder, I guess maybe this is what you want? I developed a similar CDN plugin which do this, but my sub domains is not in the same hosting, please search wordpress plugin lists, I believe you can find one which can solve your problem. ??

    Not sure do you tried Amazon S3? It is free at the first year and I used a few WP plugins support SYNC images to S3 automatically, hope this have a little help?

    Good Luck and have a Good Day. ??

    Best Regards,
    Tomas

    Thread Starter Ben4567894313148

    (@ben4567894313148)

    Thank you for the response, Tomas!

    I’d prefer to go with my option #2 and I think I solved my problem. I’m kind of embarrassed about what the problem was, too!! Turns out in my domain settings for the subdomain in Dreamhost, I had the file folder set to the same folder as the main domain. So when I went to a file in https://images.mydomain.com/folderX, it would look for folderX in https://mydomain.com/folderX. When it naturally did not find it, it returned a page not found error. I don’t know how it got set like this, but once I fixed it, it seemed to work.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Speaking for DreamHost (for whom I work) we don’t delete your files without a compelling legal or security reason, and even then we just move it out of the web folder most of the time. This is true of all web hosts. You keep paying us, you don’t do anything illegal or against our ToS, we leave your files alone ??

    Also DreamHost has a cloud you can use for images if you’re interested: https://www.dreamhost.com/cloud/cdn/

    You can direct link to public images there.

    Thread Starter Ben4567894313148

    (@ben4567894313148)

    Thanks for the info re: Dreamhost’s policy.

    I guess I was more worried that WordPress would delete it. Like I know you’re not supposed to create directories or make edits within the main WP directories and not expect them to get overwritten or messed with in an update. I just wasn’t sure about creating completely different directories there.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Oh yeah no WP won’t delete anything like that ??

    When core runs an upgrade, it ONLY would ever delete/edit files it knows about. Deletes are explicit in core (if it’s not on the file that says it’s okay to delete, it won’t touch it). Upgrades replace files, of course, which is why we shout “Don’t edit core!”

    But adding your own folder? As long as it’s in the main folder (same level as .htaccess and wp-config) it’s fine ??

    (Always make good backups of course!)

    Thread Starter Ben4567894313148

    (@ben4567894313148)

    That’s good to know! Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Options for image hosting on server but outside of WP Media Library’ is closed to new replies.