I have magento installed under my server, and I have created some custom folder and uploaded .php files there, but when I want to open that file from the url I get magento 404 page error. Those files have nothing to do with magento and I created that folder for something else. However when I upload .html file inside that folder it opens without problem.

for example:

http://example.com/folder/file.php dont work http://example.com/folder/test.html work

Is this some kind of magento block or its server related?


1 Answer 1


This is topically file and folder permission problem in your server. So you need to give the file permission of your custom folder and file as per Magento recommended.

So give directory ( your folder )and file (your_file.php) permission as

$ chmod 775 -R <your folder name>
$ chmod 644 <your file name>

If you are on a development environment, this is the way to go:

$ chmod -R 777 /magento-directory/

After that you can access of your directory or file. If you need to access the magento property, You need to add the below code at the top of your external file.

require_once('../app/Mage.php'); //Path of Mage.php

// add your stuff here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.