Installing Magento with sample data and table prefix
As we all know, the documentation for Magento is pretty poor. Now, how do you install a fresh Magento 220.127.116.11 webshop, with a prefix on the sample data? You need to prefix the sample data as well, or they will no be available.
Simple. Any hacker will try and use default settings. So, having a user called 'admin', an admin folder called 'admin' or default tablenames just makes your installation just that little bit easier to hack into. Of course, this is security by obscurity, which means that it should not be all you depend upon.
- Download the latest stable full release from ww.magentocommerce.com/download
- Download the latest sample data from the same page. Don't worry if its release number lags behind that of the full release.
- Set up your server
- Create a new database
- Now download this file to prefix the sample data with the desired prefix: https://gist.github.com/joostvanveen/5984679
- Edit the prefix and path/to/sample-data.sql in that file and run it in your browser.
- Take the newly created SQL file with prefixes and import into your database.
- Copy the Magento install files into your webroot.
- Copy the sample data media folder into your webroot.
- Change some folder permissions:
cd /into/your/project/webroot chmod o+w var var/.htaccess app/etc chmod -R o+w media
- Run the installer.
- In step 2, make sure to specify the same prefix you used in magento-sample-data-prefix-script.php