I want to prevent access to the functions file in my WordPress theme. I thought to hide functions.php by putting it on my server and calling it from the client’s server. Is that a workable solution? Is there a better approach?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is technically possible if your client’s server has allow_url_include set. However, it’s still a bad idea for four reasons:
include. Additionally, if your server is ever compromised or someone snatches your domain, they can then inject code onto your client’s server with impunity.Re-homing executable code on your server is probably a really bad idea, and while it is absolutely technically possible, there are many compelling reasons why doing things this way are a bad idea.
If you are trying to protect proprietary code from the client, your only good options are to: