cancel
Showing results for 
Search instead for 
Did you mean: 

Move Magento 2 install directory on same server - links broken

Move Magento 2 install directory on same server - links broken

Hi All,

 

I just finished up an install of Magento.  Everything worked fine.  Then I decided I wanted to move the install to a different directory.  At gnu/linux terminal I just renamed the install directory from magento_test to magento.  I updated the URL's so the site is reachable but I notice there are links that still point to the old test directory.  How do I update those?  Thanks for any tips!

 

For example below you can see links pointing to the old magento_test directory instead of the new magento directory.

 

me@myserver:/var/www/html/magento/me/pub/static/frontend/Magento/luma/en_US$ ls -l
total 96
drwxrwx--- 2 www-data www-data 4096 Jan  4 16:50 css
lrwxrwxrwx 1 www-data www-data   62 Dec 29 17:09 es6-collections.js -> /var/www/html/magento_test/me/lib/web/es6-collections.js
drwxrwx--- 3 www-data www-data 4096 Jan  7 15:30 fonts
drwxrwx--- 2 www-data www-data 4096 Dec 29 17:33 images
drwxrwx--- 2 www-data www-data 4096 Dec 29 17:09 jquery
lrwxrwxrwx 1 www-data www-data   53 Dec 29 17:09 jquery.js -> /var/www/html/magento_test/me/lib/web/jquery.js
drwxrwx--- 2 www-data www-data 4096 Dec 29 17:09 js
-rw-rw-rw- 1 www-data www-data    2 Dec 29 17:09 js-translation.json
drwxrwx--- 2 www-data www-data 4096 Dec 29 17:09 knockoutjs
drwxrwx--- 6 www-data www-data 4096 Jan  4 16:47 mage
drwxrwx--- 4 www-data www-data 4096 Dec 29 17:09 Magento_Captcha
drwxrwx--- 3 www-data www-data 4096 Dec 29 17:09 Magento_Catalog
drwxrwx--- 4 www-data www-data 4096 Dec 29 17:09 Magento_Checkout
drwxrwx--- 3 www-data www-data 4096 Dec 29 17:23 Magento_Cookie
drwxrwx--- 5 www-data www-data 4096 Jan  4 16:50 Magento_Customer
drwxrwx--- 2 www-data www-data 4096 Jan  4 16:50 Magento_Email
drwxrwx--- 3 www-data www-data 4096 Dec 29 17:09 Magento_Msrp
drwxrwx--- 3 www-data www-data 4096 Dec 29 17:09 Magento_PageCache
drwxrwx--- 3 www-data www-data 4096 Jan  4 16:47 Magento_Sales
drwxrwx--- 2 www-data www-data 4096 Dec 29 17:09 Magento_Search
drwxrwx--- 3 www-data www-data 4096 Dec 29 17:09 Magento_Tax
drwxrwx--- 3 www-data www-data 4096 Dec 29 17:33 Magento_Theme
drwxrwx--- 5 www-data www-data 4096 Dec 29 17:09 Magento_Ui
drwxrwx--- 3 www-data www-data 4096 Jan  4 16:48 Magento_Wishlist
lrwxrwxrwx 1 www-data www-data   57 Dec 29 17:09 matchMedia.js -> /var/www/html/magento_test/me/lib/web/matchMedia.js
drwxrwx--- 2 www-data www-data 4096 Dec 29 17:09 requirejs
lrwxrwxrwx 1 www-data www-data   57 Dec 29 17:09 underscore.js -> /var/www/html/magento_test/me/lib/web/underscore.js
1 REPLY

Re: Move Magento 2 install directory on same server - links broken

I think when I moved the directory and updated the URL's in admin, for some reason, not all symbolic links were updated.  I had to manually delete and then create new symbolic links.  Resolved the issue.