Question

Can't access wp-admin after I pointed my domain to a github.io server

Hi there,

After I pointed my domain spieltagsgedichte.de to a github.io server I would expect that I can still access the Wordpress admin area via http://[public IP]/wp-admin. However, that takes me to https://spieltagsgedichte.de/wp-admin. I didn’t find any redirect or A record or CNAME that points to the public IP. What can I do to be able to access my Wordpress admin area?

Many thanks

Felix

Show comments

Submit an answer


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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
July 31, 2023

Hey @felixwenzel73,

The behavior you’re seeing is likely due to the way WordPress is configured. When you installed WordPress, it saved the URL of your site (in this case, spieltagsgedichte.de) in its database. WordPress uses this URL to generate links and redirect traffic. So when you try to access your WordPress admin area via the IP address, WordPress redirects you to the URL it has stored in its database, hence why you end up at https://spieltagsgedichte.de/wp-admin.

If you want to access your WordPress admin via the IP address, you’ll need to temporarily change the site URL in the WordPress database.

Please follow the steps below:

  1. Log in to your server where the WordPress is installed.
  2. Access your MySQL database. You might use phpMyAdmin or simply MySQL from the command line.
  3. Open the wp_options table.
  4. Look for siteurl and home in the option_name column.
  5. Change the option_value of both siteurl and home from https://spieltagsgedichte.de to http://[public IP].
  6. Save your changes.

Alternatively, you can use wp-cli. WP-CLI is a command line interface for WordPress which is a much safer and recommended way to make such changes. You can check their website to install the tool first, https://wp-cli.org/

and then to use it, navigate to the WordPress installation directory ==> Use WP-CLI to update the siteurl and home options. Replace [public IP] with your actual public IP:

wp option update home http://[public IP]
wp option update siteurl http://[public IP]

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel