Support » Plugin: Contact Form 7 » Contact Form 7 and static export (Simply Static)

  • Hi all,

    I have a potentially challenging question: Lately, we see a trend that many people try to “hide” their WordPress (especially when using it rather as a CMS) by creating static exports.
    A nice plugin that allows to do so is Simply Static ( Unfortunately, it is not yet possible, to use forms created with Contact Form 7 using this approach (since the plugin basically generates only static HTML pages). The huge benefit would be that most (static) pages do not need to be generated from the WordPress database. In addition to that, this would pretty much limit attackers from accessing a WordPress installation.

    I would like to contribute to both plugins in a way that using forms becomes possible even after exporting a site using simply static. This has been possible with very old CMSs such as OpenEngine in the past. My idea would be the following:
    1. When Simply Static tries to export a Site, scan each single page for the contact-form-7 shortcode.
    2. Whenever the code is found, instead of exporting a static HTML page, a .php file is exported. This file should then include the original file content. In addition to that, the ContactForm 7 code fragments should be included which enable sending an e-mail when a form is submitted.

    Would this be a viable solution? Which code fragments would I need to include for such an exported file? I am very grateful for recommendations on how to start on integrating the aforementioned feature.

  • The topic ‘Contact Form 7 and static export (Simply Static)’ is closed to new replies.