• Resolved Bogdan Gerasymenko

    (@kleindberg)


    I’m trying to move uploads folder to the subdomain on fresh empty site, from https://mysite.com/wp-content/uploads/2020/05/ to https://i.mysite.com/2020/05/. I reffer this tutorial.

    I set upload_url_path = https://i.mysite.com and upload_path leave blank. When I use Media Library, I see empty thumbnails. When I upload new file through Media Library, it’s create a new record in database, but files to the subdomain doesn’t upload.

    Some information about my server:

    1. I use open_basedir on my hosting (should I turn it off?);
    2. Subdomain on my shared-hosting is an independed site (has own public_html directory: /home/username/mysite.com/www for main site and /home/username/mysite.com/i for subdomain);
    3. I use LiteSpeed web-server on the main site and Apache on subdomain
    4. CHMOD = 777

    So, how can I get the answer, why WordPress doesn’t upload files to the subdomain?

    • This topic was modified 4 years, 9 months ago by Yui.
    • This topic was modified 4 years, 9 months ago by Bogdan Gerasymenko.
Viewing 1 replies (of 1 total)
  • Thread Starter Bogdan Gerasymenko

    (@kleindberg)

    I found solution for this problem:

    1. Open ../wp-admin/options.php and fill two fields:
      upload_path: /home/username/mysite.com/i/ (absolete path starting and ending with a slash).
      upload_url_path: https://i.mysite.com
    2. Set minimal open_basedir level (/home/username/mysite.com/) to protect other sites.

    I think, my mistake was in empty or incorrect upload_path.

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress doesn’t upload files to the subdomain’ is closed to new replies.