Move files ubuntu

July 15, 2021 . 1 MIN READ

You will now have a directory called magento in your home directory. We’ll need to move the unpacked files to Apache’s document root, where it can be served to visitors of our website. We will use rsync to transfer our Magento files there, since rsync will include important hidden files like .htaccess. Once the transfer is complete, we can clean up our home directory by deleting the magento folder and archive there.

sudo rsync -avP ~/magento/. /var/www/html/

rm -rf ~/magento*

rsync will safely copy all of the contents from the directory that you unpacked to the document root at/var/www/html/. Now we need to assign ownership of the files and folders to Apache’s user and group:

sudo chown -R www-data:www-data /var/www/html/

 

Leave a Reply

Your email address will not be published. Required fields are marked *