0092 - 313-4567341

Controller overriding in Magento

  Zahid Mughal   Oct 12, 2014   Blog   0 Comment

I have seen a lot of Magento projects are crashed due to bad approach used while developing the project. Most of the time client has asked me that my project was running on live server but when i upgrade the version of my Magento then whole project crashed. I don’t think that it is only for Magento but all the Developers use the best approach without changing the core files of libraries instead override them with the help of simple module creation.

In Magento directory structure is app/code/core/Now, most of the developers use this technique to change the core files instead of making modules in app/code/local or community. This is because they either have no idea of overriding the controllers | models | Block or they want to save the time. But such approach can run the website but it will crash your whole website anytime.

Follow the below guideline to override the controller without changing the core controller classes.


I am going to override the contact us page controller. I will not change the core files instead will make a module locally.



Refresh the cache and test the contact us form, we have override the functionality without touching the core classes. You can also use the method to copy Mag folder in the local module place and then override but this is not the actual way of development because it will also make issue.

About Zahid Mughal

I have rich experience in WordPress Speed Optiomization which includes optimization of images, css, js, database and code. i’m also working as full-stack wordpress developer to provide PSD to HTML pixel perfect themes development, Plugins development. I’m also Certified (C|EH v.9) Ethical Hacker and having excellent skills in WordPress websites security, malware removal techniques, white-list websites from Google Black-list database. I’m also Top Ranked Website Security Analyst (Penetration Tester) Over $200k Earned at Upwork (2012-present) with both freelancing and agency profile. In WordPress website security, i mostly follow the best techniques to find and remove the vulnerabilities, backdoor from plugins, codes and database. WordPress website Code Audit is one of my favourite job.

Post a Comment

Your email address will not be published. Required fields are marked *


Delta Road, Sharif Colony Gujranwala, 52250 +92-313-4567341