How to turn "Magic Quotes" on or off

Your script might require you to change the default value of "magic quotes" and this is easily achieved within a .htaccess file.

Please note that before making any changes to the .htaccess file we suggest that you make a backup of the original.

In cPanel:

  • Login to cPanel and click on File Manager under the Files section.
  • Make sure "Web Root" is selected and that "Show Hidden Files" is ticked, then click "Go".
  • Right click on the .htaccess file and then select "Code Edit". Click on "Edit" if another windows pops up after selecting "Code Edit".
  • Unless someone has previously edited the .htaccess file it should be blank. Add the following code to the file:
php_value magic_quotes_gpc off


php_value magic_quotes_gpc off
  • Once you've done this click save at the top right and then click on close.

If you require further assistance please contact our support team.

Is article helpful?