Our Magento Git Guide and Work Flow

Introduction We have long been advocates of using SVN – but times have changed and so has the style of the way we work – which is what makes Git such an appealing choice for us. So if you’re coming from SVN too, some things worth knowing are: Repositories are de-centralised – With SVN, you have 1 master repository in a central location and everything is checked in/out of this location; with Git, its different. Each copy of the project tree (ie. your working copy) has its own repository – the .git sub-directory of the project tree root. Revisions are no longer decimal numbers – With SVN, your revisions are numbered sequentially with an integer. Due to the distributed nature of Git, and its potential to scaling to hundreds of thousands of revisions, the revisions are identified by a SHA1 hash. You can still short-cut your way through the tree … Continue reading

Quicker Dumping of a Magento MySQL Database for Branching

Any experienced Magento developer will certainly have felt the pain of dumping a multi-gigabyte MySQL database for a Magento store. Which is certainly a tedious process when you want to make a quick branch or rapidly update your staging environment. We’re big advocates of branch often and merge often – but this also means updating the DB relatively frequently too (if there has been DB changes on master/trunk). Usually, its just an excuse to go get a fresh cup of coffee whilst you while away the 2 minutes it will take to dump and however long it then takes to re-import into a new DB. But, unfortunately, there is only so much coffee we should be drinking in the day, so speeding up this process is a must. Typically, a staging or development branch, doesn’t actually required all the data the live site has (sales_quotes, logs, reports, dataflow history), so … Continue reading

Quickly Purge a Magento MySQL Database

I’m sure everyone has got to that point where they need to empty a Magento MySQL database and you’ve logged into PHPMyAdmin, selected all the tables, then clicked delete. Only to find out only a small proportion can be deleted because of foreign key constraints. But if you persist, running the “select all” and “drop” process about 6 times in a row normally will end up with a nice clean DB. There can be a number of reasons why you would choose to drop all tables in a database to clear it out, rather than dropping the whole database and simply re-creating it, so we wrote a quick bash script to automate the process for you. Running the script is really easy, it will automatically populate the username, password, database name and host from your local.xml file. It even has 2 prompts to make absolutely sure that you want to … Continue reading

Rich Snippets Gone Wrong

With SEO methods evolving, an approach to increasing CTR (click through rates) is to take advantage of Google’s Rich Snippets. Running an E-Commerce store (Magento or otherwise), it would be foolish not to take advantage of this offering, either by adding product or review information to your Google listings. Especially since most SEO’s have reported that taking advantage of rich snippets can increase CTRs by up to as much as 30%. Rich snippets gone wrong But what happens if you mistakenly submit the wrong information in your mark-up? I was browsing the internet looking at different PDU’s (we’re setting up a few more racks this week, for our specialised Magento hosting). On my journey I came across Dell’s website and happened to notice their hProduct markup – except it looked like something had gone drastically wrong. https://www.google.co.uk/search?q=site:accessories.us.dell.com%20tripplite%20pdumv20hv So I checked Dell’s source code and they weren’t doing anything wrong, their … Continue reading

Benchmarking your Magento store

We get asked this quite a lot by normal store owners who want to see how good their host really is. However, our Magento Benchmark service is only really aimed at web hosts themselves. So to answer a popular question (albeit briefly): There isn’t a standardised test – as there is a myriad of different testing procedures. ApacheBench / Siege Will test PHP performance and PHP processing concurrency only (results are skewed by caching) GTMetrix Will test the overall page load time for 1 user (however, the template weight/complexity has a bigger effect on this than server performance) Pingdom FPT Much the same as GTMetrix (the results for this are even more skewed though, as it downloads ALL content in the CSS files too – not indicative of real-world load) Apache jMeter Will test PHP performance, concurrency, static content delivery, template performance and can replicate real-world browsing habits of customers; … Continue reading