- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2019
01:13 AM
05-18-2019
01:13 AM
Can I move "Media" directory to other partition?
Hello.
By default, the "Media" directory is on my "sda", but I want to add another HDD and move "Media" directory to it. Which line of configuration must be change?
Thank you.
Labels:
7 REPLIES 7
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2019
06:35 AM
05-18-2019
06:35 AM
Re: Can I move "Media" directory to other partition?
Hello,
You need change media url and make sure it will accessible by url
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer
You need change media url and make sure it will accessible by url
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2019
12:50 PM
05-18-2019
12:50 PM
Re: Can I move "Media" directory to other partition?
Accessible by url? What does it mean?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2019
12:51 PM
05-18-2019
12:51 PM
Re: Can I move "Media" directory to other partition?
Accessible by URL? What does it mean?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2019
04:34 AM
05-19-2019
04:34 AM
Re: Can I move "Media" directory to other partition?
Hello @jason_long
let's example your site url is : test.com
and you set media url to : test2.com
you need to upload all files into test2.com
hope it will help you.
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2019
06:58 AM
05-19-2019
06:58 AM
Re: Can I move "Media" directory to other partition?
Easiest thing to do is move the media directory to your other partition, then symlink media in your Magento root directory to the new location.
For example, if your Magento root in in:
/home/xxx/public_html
and your new media directory is:
/home2/xxx/media
ln -s /home2/xxx/media /home/xxx/public_html/media
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2019
07:02 AM
05-19-2019
07:02 AM
Re: Can I move "Media" directory to other partition?
Is "public_html" mandatory? The CentOS Apache directory is "/var/www/html" .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2019
07:59 AM
05-19-2019
07:59 AM
Re: Can I move "Media" directory to other partition?
No, public_html was just an example. In your case:
ln -s /path/to/other/partition/media /var/www/html/media