CAll Us: +1 888-999-8231 Submit Ticket

How To Install a Magento 2 Extension [Visual Guide]

Are you trying to learn how to install a Magento 2 extension? You can do it in two ways — using Composer or a .zip file. Although Adobe recommends using Composer, we’ll teach you both ways.

The steps to install Magento extensions are similar to those required to install a Magento theme, with a few crucial differences.

For instance, when installing a theme using a .zip archive, you must place the theme files in the app/design/frontend directory. In contrast, when installing a Magento 2 extension using a .zip file, you need to place the files in the app/code directory.

Are you ready to learn more?

Here’s what we’ll cover in this tutorial:

How To Install a Magento 2 Extension

1. Upload the Magento 2 extension files to your server.

2. Extract the .zip extension file.

3. Verify and copy the Magento extension files into the app/code folder.

4. Install the Magento 2 extension and check its status.

5. Clear Magento cache and disable maintenance mode.

Before we show you how to install a Magento 2 extension, make sure you backup your server, set pre-install file permissions, enable developer mode, and put Magento in the maintenance mode.

It also helps to install the extension on a testing server or local development environment to check for extension compatibility.

Step 1: Upload the Magento 2 Extension Files to Your Server

Log in to your Magento server as the file system owner.

Upload the .zip archive file to a new folder inside your user’s home directory using SSH or SFTP.

Step 2: Extract the .zip Extension File

Extract the .zip extension file into a new folder called extension using:

<pre><code>

$ unzip <archive>.zip -d /home/magento/extension

</code></pre>

Once you finish the extension installation process, you can delete this folder using:

<pre><code>

$ rm -R /home/magento/extension

</code></pre>

Step 3: Verify and Copy the Magento Extension Files Into the app/code Folder

Verify the extracted component file structure meets Magento’s required “vendor/module-name” format.

Navigate to the Magento project root directory and copy the extension files to the app/code folder using:

<pre><code>

$ cp -R /home/magento/extension/* app/code

</code></pre>

The app/code directory doesn’t exist in the default Magento filesystem. If this is your first attempt to install a Magento extension manually, create the directory using:

<pre><code>

$ mkdir app/code

</code></pre>

Step 4: Register the Magento 2 Extension and Check Its Status

Complete the Magento 2 extension installation process by executing:

<pre><code>

$ php bin/magento setup:upgrade

$ php bin/magento setup:di:compile

$ php bin/magento setup:static-content:deploy -f

</code></pre>

The “setup:upgrade” command registers the Magento 2 extension and updates the Magento database schema and data. The subsequent commands compile Magento code and deploy static view files.

Note: You don’t need to deploy static view files in developer mode unless your extension developer’s documentation mandates it.

Verify the status of the extension:

<pre><code>

$ php bin/magento module:status <VendorName>_<ComponentName>

</code></pre>

If it’s disabled, you can enable it using:

<pre><code>

$ php bin/magento module:enable <VendorName>_<ComponentName>  –clear-static-content

</code></pre>

Step 5: Clear Magento Cache and Disable Maintenance Mode

Clear the Magento cache using:

<pre><code>

$ php bin/magento cache:clean

$ php bin/magento cache:flush

</code></pre>

Follow Adobe’s guide to set permissions for a production file system. Then, disable maintenance mode using:

<pre><code>

$ php bin/magento maintenance:disable

</code></pre>

Nice work! You’ve learned how to install a Magento 2 extension using a .zip file.

How To Install a Magento 2 Extension With Composer

Before we show you how to install a Magento 2 extension via Composer, make sure you:

  1. Back up your server.
  2. Set pre-install file permissions.
  3. Enable developer mode.
  4. Put Magento in maintenance mode.

Once you’ve met the above conditions, follow our installation guide.

Step 1: Obtain the Extension’s Composer Name and Version

Log in to your Magento Marketplace account and navigate to [Your name] > My Profile.

Go to Marketplace > My Products and click My Purchases.

Locate the Magento 2 extension you want to install and note its Component Name.

Click on the Versions available dropdown and note the version number to install a specific version.

Step 2: Update the Magento composer.json File

Log in to your Magento server as the file system owner and navigate to the Magento root folder to install the module via Composer.

Update the composer.json file from the command line interface (CLI) using:

<pre><code>

$ composer require <component-name>:<version>

</code></pre>

Replace “component-name” and “version” with the values obtained in the previous step. For example:

If prompted to enter access keys, copy and paste your public key as the username and private key as the password.

Wait for Composer to update the Magento project dependencies. In case of errors, address them before proceeding.

Step 3: Register the Extension and Clear Magento Cache

Run the following commands to register the Magento 2 extension, compile code, and deploy static view files:

<pre><code>

$ php bin/magento setup:upgrade

$ php bin/magento setup:di:compile

</code></pre>

Clear the Magento cache by executing:

<pre><code>

$ php bin/magento cache:clean

$ php bin/magento cache:flush

</code></pre>

Step 4: Check the Magento 2 Extension Status

Verify the extension status:

<pre><code>

$ php bin/magento module:status <VendorName>_<ComponentName>

</code></pre>

If disabled, enable the extension:

<pre><code>

$ php bin/magento module:enable <VendorName>_<ComponentName>  –clear-static-content

</code></pre>

Step 5: Update File Permissions and Disable Maintenance Mode

Set file permissions for a production file system based on your hosting setup. Then, disable maintenance mode as follows:

<pre><code>

$ php bin/magento maintenance:disable

</code></pre>

Congratulations! You’ve successfully learned how to install a Magento 2 extension using Composer.

Final Thoughts: How To Install a Magento 2 Extension

Learning how to install a Magento 2 extension is the best way to add and extend Magento store functionality. Since Adobe deprecated the Web Setup Wizard in Magento 2.3.6 and above, you can only install Magento 2 extensions using the methods described above.

No matter which method you choose, make sure you backup your server before you begin and set production file permissions after you’re done.

If that seems too much work, sign up for managed Magento hosting with Hostdedi and enjoy the convenience of automatic nightly backups and a secure Magento 2 hosting environment.

Browse our plans to learn more.

Source link

How Much Does It Cost to Start an Online Business?

You’ll pay a lot less to start an online business than to open a traditional brick-and-mortar store. Let’s look at why more people are launching new businesses online as we answer the question, “How much does it cost to start an online business?”

The introduction of more user-friendly online store builders and managed web hosting makes starting an online business easier and cheaper than ever before. In this post, we look at the average cost of starting a business online compared to opening a physical location and how you can quickly and affordably launch your own ecommerce business.

How Much Does It Cost to Start an Online Business?

Online businesses can be launched with little up front — as low as $300 and upwards of $1,000. That’s much less than a typical business, which can range from a couple thousand to several hundred thousand dollars. While other businesses with traditional brick-and-mortar locations must invest large sums in buying and leasing space, equipment, and inventory, how much you’ll spend starting your business depends on what type of business you want.

Common startup expenses for traditional businesses include:

  • Retail or office space
  • Equipment and fixtures
  • Supplies
  • Phone, internet, and other communication methods
  • Electricity, water, gas, and other utilities
  • Professional services such as accountants or lawyers
  • Insurance
  • Business and building licenses and permits
  • Inventory
  • Employee salaries
  • Advertising and marketing
  • Web and email hosting

Use this template from the U.S. Small Business Administration to calculate your startup costs.

Starting an online business is much cheaper than starting a business with a physical location because you don’t have to lease or buy the space. But the high costs are not due to the real estate alone. You also need to buy furnishings and shelves for the space, inventory to put on the shelves, and hire employees to stock the shelves and run the cash register.

Benefits of Starting an Online Business

An online business eliminates many costly aspects of operating a physical storefront. Cheaper startup costs, lower overhead, better inventory management, and ease of setup are the main advantages of starting a business online.

Cheaper Startup Costs

Businesses that operate exclusively online have lower startup costs. You can launch a website from any place you have a computer. You don’t have to set up a physical location. Many people start and continue to operate ecommerce businesses out of their homes. Operating an online business also requires fewer licenses and permits. Read our step-by-step guide to getting a business license for ecommerce for more details.

Lower Overhead

Online businesses have lower startup costs, and ongoing operating expenses are much lower than traditional businesses. An ecommerce website is open 24/7 to accept sales. A brick-and-mortar business requires space, staff, and utilities to open. You have to pay the electric bill and your employees even if you don’t make a sale all day.

Better Inventory Management

One of the challenges of operating a brick-and-mortar store is identifying what items to stock. Order too much of the wrong thing, and you could end up selling it at a loss in an end-of-season clearance sale.

With an ecommerce store, you can invest in smaller quantities of items and then buy more once sales start to take off. You also could utilize dropshipping where you don’t keep any of the inventory on hand. You list the product on your website and pass the order information to the drop shipping company that packs and ships the order. You only pay for what you sell instead of buying inventory upfront.

For more about dropshipping, check out our posts: Dropshipping vs. Ecommerce: A Beginner’s Guide and How Do I Find the Right Dropshipping Suppliers?

Ease of Setup

Setting up an ecommerce store has not always been simple or cheap. In the early days of ecommerce, you might have spent countless hours or thousands of dollars trying to integrate credit card payments into your website. Thankfully, those days are long gone. Setting up an ecommerce store is mostly plug-and-play with modern ecommerce platforms.

Ecommerce Startup Cost

So what do you need to start an online business? Most ecommerce businesses will need an ecommerce platform, domain registration, and web hosting. If you’re using drop ship fulfillment, you won’t even have to buy inventory. You could easily build an online store for less than $300 in your first year.

But keep in mind, that’s only your hard costs for the website. That doesn’t include paying for your time. The low cost of entry makes launching an ecommerce store a great option for people who already have another job. Many entrepreneurs build up their business on the side before they quit their day jobs.

The Most Affordable Way to Start an Online Store

StoreBuilder by Hostdedi offers an affordable and easy way to build an online store. You can launch your store in days, not months. The online store builder offers secure managed hosting from Hostdedi and an easy-to-use WooCommerce-powered online store. WooCommerce is the most popular and powerful open source ecommerce platform.

StoreBuilder makes WooCommerce more approachable with a guided setup wizard and pre-installed plugins. With a price of only $19 per month, StoreBuilder helps aspiring entrepreneurs keep their ecommerce startup costs to a minimum.

Sign up today for a 30-day free trial.

Source link