skip to Main Content

I have a page where I cannot own the domain currently as the domain is not yet free to buy. But I need to create the new WordPress site already.

So the WordPress page is already available via IP. But as you can see from the image, it tries to connect to the final domain.

How can I use the WordPress page via IP only, until I finally own the domain?

For info, I use DigitalOcean WordPress Droplet. This is a preconfigured setup for running WordPress on Ubuntu.

I already tried to:

  • edit Apache vhost config
  • edit WordPress config
  • edits hosts file

without success.

enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    As the URL is written directly into the database. The best way is now to connect to MySQL and change the domain directly there:

    1. log into the SSH session of your server

    2. type mysql to access MySQL

    3. now you can use SHOW DATABASES; to select the proper database in the next step

      in my case, it's called wordpress

    4. to get into the database, type USE wordpress;

    5. to see the current URL type Select * from wp_options where option_name IN('siteurl','home');

      for me it's http://159.89.***.***

    6. now we can overwrite both with

      update wp_options set option_value='http://www.shop123.com' where option_name = 'siteurl';

      and

      update wp_options set option_value='http://www.shop123.com' where option_name = 'home';

    7. and leave with exit


  2. There are a few easy methods to change the Site URL manually. Any of the methods will work.

    It is possible to set the site URL manually in the wp-config.php file.

    Add these two lines to your wp-config.php, where “127.0.0.1” is the correct IP address of your site.

    define( 'WP_HOME', 'http://127.0.0.1' );
    define( 'WP_SITEURL', 'http://127.0.0.1' );
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search