The allow_url_fopen option lets PHP scripts open files from web addresses. Some plugins need it, while turning it off can improve security. You can change it in Select PHP Version.
You can use CloudLinux Selector to enable or disable the allow_url_fopen directive in cPanel.
1. Log in to your cPanel account.
2. In the Software section, click on Select PHP Version.
![]()
3. Click on the Options menu.

Note: If the Options page shows an error related to the native PHP version, change it to a non-native version first.
4. For enabling allow_url_fopen, checkmark it. For disabling it, uncheck it.

Security trade-off
Leave it off unless a plugin needs it. When enabled, a vulnerable script could fetch remote files more easily.
If the Options page shows an error
Switch to a non-native PHP version first, then open Options again.
Frequently asked questions
Should I enable allow_url_fopen? Only if your script or plugin requires it. Otherwise leave it disabled.
Does it affect all my websites? It applies to the PHP settings of the account or domain you are editing.
Related guides
Need cPanel hosting in Kenya? See KickHost hosting plans or contact our team.
Found this useful? Share it.
