• Resolved imjscn

    (@imjscn)


    Hello,
    I setup a subdomain for upload storage. I can see from my host Online File Manger, that there’s a directory for each domain and subdomain, and it’s empty inside the subdomain directory.
    I WP “Store uploads in this folder:” option, I set it to:
    /subdomain/upload

    seems this setting is wrong coz I can’t view content in this /subdomain/upload in browser.

    How can I access stuffs saved in subdomain directory from WP which installed in main domain?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    To find the absolute path of a subdomain, copy the text below into a new text file, save the file as path.php. Put it in the subdomain, then open it in a Web browser (for example, https://www.example.com/images/subdomain/path.php).

    <?php
     $p = getcwd();
     echo $p;
     ?>

    copy the url and put it in the “Store uploads in this folder:”
    Remove the path.php afterwards.

    Thread Starter imjscn

    (@imjscn)

    @keesiemeijer,
    Thanks for helping!
    I saved the path.php in this directory: /sub.main.com/htdocs
    Then, I tried 2 links to open the file:

    1. https://www.main.com/sub/path.php
    This opens my blog with the header and sidebar, but main area shows Error 404 page not found;

    2. https://www.sub.main.com/path.php
    This shows connection timed out (can’t find the page).

    I also tried to save the path.php in root of subdomain directory, and tried the above 2 links, the result is the same.

    By the way, I didn’t install anything in the subdomain directory. It’s a directory automatically created when I create the subdomain under my main domain.

    Any suggestion?

    Regards

    Moderator keesiemeijer

    (@keesiemeijer)

    By the way, I didn’t install anything in the subdomain directory. It’s a directory automatically created when I create the subdomain under my main domain

    I don’t think this is it: /sub.main.com/htdocs. Maybe this is it: /htdocs/sub/. Put it in the directory that is automaticly created. And then go to https://www.sub.main.com/path.php

    Thread Starter imjscn

    (@imjscn)

    I followed the above instruction, this time opened DNS service’s page saying the link can’t be loaded. I think the link you gave is correct, but I might be having problem on DNS. I can’t flushdns and reboot pc for the moment, I will try again and come back later.

    Thread Starter imjscn

    (@imjscn)

    Keesiemeijer,
    After flushing DNS, I found the path via opening your path.php. Big thanks!

    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to get files from subdomain?’ is closed to new replies.