skip to Main Content

I’m a beginner to a magento. Kindly help me I’m stuck with this.I have source files and database. But I don’t know how to setup.

2

Answers


  1. These steps will help you:

    1.Download the code base.

    2.Download the database.

    3.Import the database to the mysql

    4.Put the code to the server webroot from where I can execute it using browser for e.g I am using wampserver on windows 7 so I put code into the
    C:wampwwwlocal dir.

    5.First remove all the folders and files from the webroot/var/cache/ directory

    6.Backup your local.xml file and delete the local.xml file from webroot/app/etc/ directory

    7.Then from the browser access the url for the local site, for e.g mine would be http://localhost/localmagento/, Magento will automatically start the installation process, where you need to provide new login details for admin and your local site URL etc, for your local environment.

    You can refer to Magento official documentation.

    Login or Signup to reply.
  2. Assume that you have the source and database files.
    For Magento 1

    So you have the source file and database right then
    if you use the lampp server in ubuntu then follw the steps below.

    1) we can put the source file in your localhost project root folder
    2) via terminal you can import the database for that

    2a)create a database for eg: “magento1_local”

    2b)go to the run the command

    mysql -u username -p magento1_local < dbfile.sql

    enter mysql password if you set for localhost

    3)After successful import of database you need to change base_url in the table “core_config”

    4)change config settings in the file app/etc/local.xml (change database credentials)

    5)check and give permission for the folder var/ , media/ app/etc

    For Magento 2

    So you have the source file and database right then

    1) we can put the source file in your localhost project root folder

    2) via terminal you can import the database for that

    2a)create a database for eg: “magento2_local”

    2b)go to the run the command

    mysql -u username -p magento_local2 < dbfile.sql

    enter mysql password if you set for localhost

    3)After successful import of database you need to change base_url in the table “core_config”

    4)change config settings in the file app/etc/env.php (change database credentials)

    5)check and give permission for the folder var/ , pub/ app/etc
    and run the below commands

    sudo php bin/magento setup:upgrade
    sudo php bin/magento setup:di:compile
    sudo php bin/magento setup:static-content:deploy
    sudo php bin/magento indexer:reindex
    sudo php bin/magento cache:clean
    sudo php bin/magento cache:flush
    sudo chmod 777 -R var/ pub/media pub/static
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search