Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8477619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:31:04+00:00 2026-06-10T18:31:04+00:00

I want to prevent access to the functions file in my WordPress theme. I

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:31:06+00:00Added an answer on June 10, 2026 at 6:31 pm

    This is technically possible if your client’s server has allow_url_include set. However, it’s still a bad idea for four reasons:

    • Speed: opening another HTTP request and waiting for it to complete every time anyone views your client’s site will get slow very fast. It’ll also hammer your site.
    • Security: The PHP file on the remote server (your server, in this case) will need to be printed in plaintext. This could be a bad thing, particularly if you’ve written customized, potentially-insecure code in it. Coincidentally, this also means that your approach won’t actually stop your client from finding out what the script does. There’s also nothing stopping the client from loading the URL of your unprotected script, pasting it into his WordPress directory, and altering the 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.
    • Ethics: Unless your client is explicitly made aware of this arrangement, it is unethical because if your business relationship terminates he or she will still be vulnerable to code injection, even after terminating your FTP/SSH/WordPress dashboard access.
    • Reliability: If you do this, any time your site is offline your client’s site will die with a messy error message.

    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:

    1. Host his site yourself. This could be profitable down the line if your technology is something that a specialized hosting company could be built around.
    2. Build an API that can grant metered access to your proprietary data or processing, and write a WordPress plugin to talk to the API. This could be profitable down the line both by encouraging developers to write software for your system, and the WordPress plugin would lower the barrier for entry to doing business with you.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to prevent direct access my install.php file, unless the user has gone
I want to disallow access to file system from clients code, so I think
I want to prevent my activity from restarting when I change the orientation from
I want to prevent my application from being reverse engineered and decompiled by someone
I want to prevent sending file on hotmail/gmail accounts. Is it possible to track
I want to prevent my asp.net / c# 2008 web pages from being cached
I want to prevent users from commenting on deleted threads. I've set a variable
I want to prevent iframe elements from triggering the OnDocumentComplete event every time. For
What solutions do I have if I want to prevent the UI from freezing
Using php I want to load XML files from several websites and want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.