Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

A WordPress instance on Plesk fails with error 500: PHP Fatal error: Failed opening required ‘/var/www/vhosts/example.com/public_html/wordfence-waf.php’

 
applications extensionscpaneldomain namedomainsphp

Symptoms

  • A WordPress instance site shows error 500.

  • The website has been migrated from cPanel.

  • The following errors can be found under Domains > example.com > Logs:

    Warning 203.0.113.2 mod_fcgid: stderr: PHP Fatal error: Failed opening required '/var/www/vhosts/example.com/public_html/wordfence-waf.php'

  • There is a .user.ini file at the public_html root directory folder with the following instruction:

    ; Wordfence WAF
    auto_prepend_file = '/var/www/vhosts/example.com/public_html/wordfence-waf.php'

Cause

WordFence plugin was removed from the WordPress instance but some leftovers of this still exist.

Resolution

  • Edit the .user.ini file to comment the sentence that starts with "auto_prepend_file" by adding a semicolon (";") before like:

    ; Wordfence WAF
    ; auto_prepend_file = '/var/www/vhosts/example.com/public_html/wordfence-waf.php'

Command Line solution:

  1. Connect to the server via SSH.

  2. Run the following command while replacing example.com by the WordPress domain name:

    # sed -i -e '/wordpress-waf.php/s/auto_prepend_file/;auto_prepend_file/' /var/www/vhosts/example.com/public_html/.user.ini

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

WebPros Announces the Promotion of Jesse Asklund to Chief Product Officer

Read More »

Ruby on Rails vs PHP: Which one’s right for your needs?

Read More »

Hosting Control Panels of 2024 – The Definitive Guide

Read More »
Knowledge Base

Unable to secure WordPress instance in Plesk: Permissions for files and directories still marked as Not Secure

Read More »

Unable to remove WordPress instance via Applications: Permission denied

Read More »

WP Toolkit shows WordPress instance as broken when a domain is using Alt-PHP: Error establishing a database connection

Read More »

WP Toolkit Cloning hangs or stops after 60 seconds on a Plesk server

Read More »

Hosting Wiki

  • Server Redundancy
  • AMP
  • Bare Metal Server
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • PHP
  • Domain
  • WordPress
  • cPanel/WHM
  • Plesk
  • Web Server
  • DNS Server
  • SSH
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family