In files on the server I have directories “shop” and “wp”. The hosting is configured that “shop” is being used by subdomain “shop.domain.com” and “wp” (which is a wordpress installation) is used by “www.domain.com”.
I have copied /shop to /wp/shop. Both installation at this point use the same database. The I opened “shop.domain.com/backend” and configured “host” from shop.domain.com to www.domain.com and “path” to /shop.
At this point I am able to open the shop at “www.domain.com/shop” as well backend at “www.domain.com/shop/backend”, but the system get 404 on a lot of tries to get important resources from the server.
What am I doing wrong and how can I do what I want?
did you clear the whole cache after changing the host entry? If not do so. And it’s a pretty bad idea to share a database between Shopware and Wordpress. Shopware should have it’s own database.
As you understand, I use [something] here as a substitute for real values.
UPDATE: when opening www.domain.com/shop, the system also has some 404 errors as when opening /shop/backend
UPDATE: to make it more clear… the 404s when there is usage of server path instead of url are about loading resources from the server path of OLD installation…
Could you send us a screenshot of the shop settings? ( Basic settings > Shop Settings > Shop ) . You should leave the “virtual path” setting empty.
I experienced the same error that Shopware tries to load the resources from an url containing the server root path when moving a shop and I forgetting to clear the cache. Make sure you cleared the whole cache ( not just the template cache ). I would recommend running the clear_cache.sh script in _Shopware_Root_/var/cache/clear_cache.sh.
Ok then login via FTP and rename the folder in /var/cache/ called production_XXX_ to something else ( remeber the original filename so you can move it back properly if needed ).
Then try to load the backend.
The settings are correct. You can clearly see that Shopware is still looking for the files in the old directory ( […]htdocs/[login_on_server]/domai n.com/shop/the mes/[…]. The wp folder is missing.
There vere 3 folders of that format. I added an underscore to the beginning of each of their names and voila! It works.
Thank you very much, simkli, you made my day. I would probably never find this it out alone and it would have taken much more of my time to solve it :)
Yes you can delete them now. Just in case Shopware would’ve thrown a Doctrine error after renaming them you’d had to move them back. But that didn’t happen so it’s safe to delete them.