Skip to content

Error loading Requests.php file in WordPress Docker container #359

@KKTRKKT

Description

@KKTRKKT

I encountered an error while running the WordPress Docker container with the following setup:

Operating System: Windows 10
Docker Compose Version: 1.29
WordPress Version: lastest
The error message I received is as follows:

[21-Jun-2023 07:49:53 UTC] PHP Warning:  require_once(/var/www/html/wp-includes/Requests/src/Requests.php): Failed to open stream: No such file or directory in /var/www/html/wp-includes/class-requests.php on line 33
[21-Jun-2023 07:49:53 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/html/wp-includes/Requests/src/Requests.php' (include_path='.:/usr/local/lib/php') in /var/www/html/wp-includes/class-requests.php:33
Stack trace:
#0 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/IncludeRequestsAutoloader.php(77): require_once()
#1 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(83): WP_CLI\Bootstrap\IncludeRequestsAutoloader->process(Object(WP_CLI\Bootstrap\BootstrapState))
#2 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
#3 phar:///usr/local/bin/wp/php/boot-phar.php(20): include('phar:///usr/loc...')
#4 /usr/local/bin/wp(4): include('phar:///usr/loc...')
#5 {main}
  thrown in /var/www/html/wp-includes/class-requests.php on line 33

I have followed the provided Dockerfile to set up the wp-headless service, but it seems that the Requests.php file is missing from the /var/www/html/wp-includes directory.

I have tried stopping and removing the wp-headless container, and then recreating it using the docker-compose up -d wp-headless command, but the issue persists.

I would appreciate any guidance or suggestions on how to resolve this error and successfully run the WordPress Docker container.

Thank you for your assistance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions