Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Move a Magento Store From Your Computer to a Server

This guide shows how to take a Magento store built on your own computer and put it on live hosting. It is written for Magento 2.

CMS and Apps2 min read13 steps3 screenshots

What does moving a store mean?

Localhost is your own computer acting as a web server. You build the store there in private. Moving means copying two things to your host: the files and the database. A database is where the shop keeps products, orders and customers.

Screenshot: Localhost is your own computer acting as a web server. You build the store there in privat

Magento is a big program. Ask Hostvento support if your plan can run it. Magento needs good memory and a recent PHP version. SSH access helps a lot. SSH is a safe way to type commands on your server.

Warning: Keep a copy of your local store. Never work on your only copy.

Steps

Part 1: Prepare your local store

  1. Clear the cache. In the Magento folder, run:
php bin/magento cache:clean

This removes temporary saved data.

  1. Zip the whole Magento folder. You may skip the var and generated folders to keep it small.
  2. Export the database with phpMyAdmin. Click your database, then Export, then Go.

Part 2: Upload to the server

  1. In cPanel, open MySQL Databases and create a database and a user. Give All Privileges.
  2. Open File Manager, go to public_html, upload your ZIP and extract it.
  3. Open phpMyAdmin, pick the new database, click Import and select your .sql file.
    Screenshot: Open phpMyAdmin , pick the new database, click Import and select your .sql file.

Part 3: Fix the settings

  1. Open app/etc/env.php with File Manager. Update the db section with the new database name, user and password.
  2. In phpMyAdmin, open the table core_config_data.
  3. Find the rows with the paths web/unsecure/base_url and web/secure/base_url.
    Screenshot: Find the rows with the paths web/unsecure/base_url and web/secure/base_url .
  4. Change them to your live address, for example https://yourdomain.com/. Keep the slash at the end.

Part 4: Finish up

  1. If you have SSH, go to your Magento folder and run:
php bin/magento setup:upgrade
php bin/magento cache:flush

The first line updates the database parts. The second clears the cache again.

  1. Set folder rights as Magento advises, usually folders 755 and files 644.
  2. Open your domain and test the shop, the cart and checkout.
Tip: If pages show errors, ask Hostvento support to check the PHP version and memory limit. Also read the log files in var/log.

Quick recap

  • Copy two things: files and database.
  • Create a new database and update app/etc/env.php.
  • Change the base URLs in core_config_data.
  • Run setup:upgrade and flush the cache.
  • Test the shop before you announce it.