Skip to content

WordPress Redirects to IP Address Instead of Domain #844

Closed

Description

@ErminMerdanovic

Hello everyone, I'm currently in the process of setting up WordPress using Docker Compose and Apache which is running on the host as a reverse proxy (unfortunately, I can't use nginx). Additionally, I use Cloudflare. When I attempt to access the site using the domain, I encounter an immediate redirect to "https://127.0.0.1:8585/wp-admin/install.php" instead of the desired "https://domain.com/wp-admin/install.php". To address this, I modified the configuration by adding the following two lines:

define('WP_HOME','https://domain.com');
define('WP_SITEURL','https://domain.com');

This adjustment successfully resolves the issue, but I'm uncertain whether this is the optimal approach. I would greatly appreciate any assistance or guidance on whether this method is appropriate, or if there's an alternative solution that can be implemented through Docker Compose environment variables. Thank you for your insights.

Edit: Unfortunately, when attempting to proceed with the above settings, I encountered again an issue. After completing the WordPress setup and attempting to access the main page of the WordPress site using the domain, I was redirected again to the IP address "https://127.0.0.1/". Is there anyone who has a solution for this problem?

Activity

  1. locked and limited conversation to collaborators on Dec 12, 2023
  2. converted this issue into a discussion #873 on Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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