In our previous article, we have written about how to install Magento 2 theme manually
In this article, we want to help site owners and developers that have accidentally deleted Magento 2 Luma theme. You have been quite satisfied with the default theme that comes with Magento Community Edition, but when you edit the code and files, somehow you make a wrong decision, and your site’s beauty has gone with the wind. Instead, you receive some message like this:
Now you would want to have your beautiful site’s theme function normally again. There are 2 solutions for this problem: Download Luma theme again and put it in the right place, or just run Composer Update command. Today, we will tackle both methods, although we recommend not downloading Luma theme as it does not require the exact version of Magento Luma theme.
Download Luma Theme
Then you want to put the theme in the right folder. The original Luma folder is located in [site directory] > vendor > magento. So you want to upload your unzipped Luma theme folder to this folder.
- First, log in to your SSH account using Filezilla.
- Locate the unzipped Luma theme folder in Local site (named “theme-frontend-luma”).
- Locate [site directory] > vendor > magento in Remote site.
- Drag unzipped folder and drop to the folder [site directory] > vendor > magento.
- Wait for some minutes.
Using Composer Update command
If you are using Magento 2 with the version other than 2.2.3, then you should use Composer Update command, as we do not provide Luma theme file for all Magento 2 version.
Since Luma theme is a Magento default theme, it can be easily restored by using composer update command. You don’t need to have any file downloaded to your computer; you only need to know how to input code to config your website. This method is more recommended for people know how to code.
- Log in to your SSH account using PuTTY.
- Input this code:
- If authentication is required,
log in to your account in Magento. Then go to Magento Access Key page. Create a new Access key if necessary, then use Public key as the username, Private key as the Password. Store your credentials if you want, but we recommend not storing.
Magento 2 Luma theme download: in conclusion,
Now your luma theme should be back to normal. It’s as simple as that.
So go ahead and try it yourself! Although you may want to download the Luma theme, we recommend that you just use upgrade command to restore the site back to its original theme. The latter seems a lot more convenient and fast than the former.
So, do you have any more question regarding your Magento 2 default Luma theme? Let us know in the comment section below.
Also, if you want to upgrade your default theme to a premium, rich-featured theme with a 5-star support team, you might want to take a look at the theme we spend months developing.