Setup Magento On WAMP – Importing A Large Database

As you may already know, WAMP server imposes some pretty strict limits on system resources and allocations. If you are trying to setup a development instance of any large database driven web app on your local machine (ie: Magento), you will definitely need to tweak some out-of-the-box settings in WAMP. In this screencast, we will briefly go over what needs to be changed in the config files in order to get your database imported.

First crack open the php.ini To do this, click on the WAMP icon in your system tray and go to php >> phi.ini. Then find these values: post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
And change them to these values: post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M
Lastly, if you are using phpMyAdmin (bundled with WAMP Server), you will need to make one last change in the config file in order to import large databases. Crack open the config.inc.php file, which is typically found in c:\wamp\apps\phpmyadmin\config.inc.php. Then add the following snippet to the bottom of the file, just above the closing PHP tag: $cfg ['ExecTimeLimit'] = 0;. That’s it – hope this helps someone out there! And without further adieu…

Comments

  • Jgae35

    Thanks!

  • ct

    Hi, I saw your stackoverflow comment and came here. If these methods are not ok, you can create .htaccess file and  add these lines:

    php_value upload_max_filesize 720Mphp_value post_max_size 720Mphp_value max_execution_time 200php_value max_input_time 200

  • Fosuhene Andrews

    thanks friends, it worked perfectly

  • Jimmy Burton

    John, Excellent tut. How do i now download my current magento db and move it to my localhost install?

  • http://www.john-dugan.com John Dugan

    Hey Jimmy – like all things dev there are numerous ways. Being that I am a frontend guy, I shy away from the command line whenever possible in favor of a tool. I typically use phpmyadmin for all things database.

    In phpmyadmin you would simply export the database and change a couple database fields to get things working on your local instance. For Magetno, those fields are: web/unsecure/base_url and web/secure/base_url. Both fields reside in the core_config_data table of your Magento database.

    Make sense? If not shoot me a reply and I’ll try to be more thorough.