Here we cover essential commands to manage your Magento store efficiently. These commands are commonly used and can be executed from the Magento document root by the user who owns the files (usually you, the cPanel user). Let's explore:
- Upgrade the database: Keep your Magento database up to date, ensuring access to the latest features and improvements.
- Set production mode: Optimize your store's performance and security by easily switching to production mode.
- Reindex missing products: Ensure accurate search results by refreshing indexes and resolving issues with missing products.
- Compile missing extensions: Resolve missing extension problems by compiling necessary components, enhancing the store's functionality.
- Clear the cache: Provide a fresh browsing experience by clearing the cache, ensuring your customers receive the most recent updates.
By familiarizing yourself with these commands, you'll have the necessary tools to efficiently maintain and optimize your Magento store.
Related Articles
Magento Minimum Requirements
Create Admin User in Magento
Magento Stuck in Maintenance Mode
Common Commands
CAUTION: Please be aware providing support on this issue is out of scope (OOS). Politely advise the customer this request is outside of our scope of support and requiring a third-party developer will be required for further assistance.
- SSH into the server
-
Switch to the cPanel user with
su userna5
REPLACE: userna5 with the cPanel username that owns the Magento website. - Navigate to the document root
-
Run one of the following commands
-
This command should only be run when Magento needs a database upgrade after the customer has performed a system upgrade from the Magento backend
CAUTION: Do not run this if the site has other or unrelated issues.
php -f bin/magento setup:upgrade -
This command should only be run when the customers ask us to. By default, on a fresh Magento installation, the mode is set to default
php -f bin/magento deploy:mode:set production -
This command can be used to resolve many issues including new products not showing up after they are added
php -f bin/magento indexer:reindex -
This command should only be run after the customer has installed a Magento extension and the extension is not showing up in the Magento back end
php -f bin/magento setup:di:compile -
This command should only be run in case new products do not show or the customer has added new images, categories, or CMS pages and they are not reflecting on the front end
php -f bin/magento cache:flushNOTE: Magento heavily relies on the cache. By default, the cache for Magento is stored at /$docroot/var/cache/. To empty out the Magento cache, we can either delete all folders inside the cache folder, rename the cache folder and create a new one, or run the command below from the Magento document root as the Magento user and while being inside the document root for the Magento installation.
-
Comments
0 comments
Article is closed for comments.