• fobvpadmin

    (@fobvpadmin)


    I look after a small WP website. I developed some php-based web forms for people
    to supply contact details etc. Since (by default, at least) WP prohibits upload of php files from the dashboard I used ftp to install these forms. I chose to put them in a folder I added directly under /public_html. I did this some time ago; and they work OK.
    But I have wondered if this might be considered bad practice by WP? How tolerant is it of
    departures from the default file system structure? Would it be better (safer?) to set up a subdomain to hold such things?
    Advice very welcome!

Viewing 2 replies - 1 through 2 (of 2 total)
  • If it works for you, who is to say it’s “bad practice by WP” — as long as you’ve taken steps to secure the script (so it won’t be used to spam you and others, or worse, become the doorway that let hackers into your site).

    That said, the “WordPress way” of enhancing and augmenting the built-in features is through the use of plugins. And there are already dozens of free drag-and-drop form builder plugins out there with more features than you can ever need.

    Moderator bcworkz

    (@bcworkz)

    Assuming you’ve implemented proper security and functionality in your forms, as George said, you can use them in parallel with your WP site just fine. However, such forms generally don’t appear well integrated with your WP site. Of course you can rebuild the same sort of forms using a page builder plugin. But if you really like your forms as-is, and just wish they were better integrated, there’s a good chance your existing form .php files can be easily converted into custom page templates. Success will vary depending on how your .php files are constructed.

    If you make them into page templates, keep them in a child theme.
    https://developer.wordpress.org/themes/template-files-section/page-template-files/
    https://developer.wordpress.org/themes/advanced-topics/child-themes/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Installing php webforms’ is closed to new replies.