Hi:
I have followed the instructions for your freebsd tutorials. I have set up apache24, and I can see the “It works” page. I am trying to set up wordpress. I have follwed this tutorial:
When I go to the site to setup wordpress, I get a blank page, and this error message in httpd-error.log:
Fatal error: require(): Failed opening required ‘xxx/wp-includes/load.php’ (include_path=‘.:/usr/local/share/pear’) in xxx/wp-settings.php on line 21
My complete installation is from ports.
Thanks
PD: I did delete the “it works” file
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This question was answered by @gutiersa:
Thanks for your reply:
yes. It has to do with apache itself. It is attempting to server from ServerRoot, rather than from DocumentRoot. I figured it out by temporarily changing this:
<Directory /> AllowOverride none Require all denied </Directory>
to this:
<Directory /> AllowOverride none Require all granted </Directory>
and adding the it works index.html file to it. then I went to the browser and entered:
http://www.mysite.com/ http://www.mysite.com/index.html
and of course “It worked”
I have gone over this over and over and can’t figure it out. Why is apache ignoring my main server configuration?
Here are some general steps to troubleshoot issues like that
Check File Paths: First, double-check that the file ‘load.php’ exists in the ‘wp-includes’ directory of your WordPress installation. Ensure that there are no typos in the file paths.
File Permissions: Make sure that the file permissions for your WordPress files and directories are set correctly. Typically, web server user (e.g., www or apache) should have read access to all WordPress files and directories.
You can use the following command to adjust file permissions:
chmod -R 755 /path/to/your/wordpress
You can check the PHP include path by creating a PHP file (e.g., info.php) with the following content and accessing it through your web browser:
<?php
phpinfo();
?>
Look for the include_path directive in the PHP configuration section of the phpinfo page and verify that it includes the path to your WordPress installation.
PHP Module: Ensure that the PHP module for MySQL or MariaDB is installed and enabled. WordPress requires this module to connect to the database.
You can check if the module is installed by running the following command:
php -m | grep mysql
If the module is not installed, you can install it using the package manager or ports system on FreeBSD.
Database Configuration: Double-check the database configuration in your WordPress configuration file (wp-config.php). Make sure the database credentials (database name, username, password, and host) are correct.
PHP Error Logging: Check if PHP error logging is enabled and configured properly. You can specify an error log location in your Apache or PHP configuration. This can help you get more detailed error messages in case of issues.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.