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.
2
Answers
As the URL is written directly into the database. The best way is now to connect to MySQL and change the domain directly there:
log into the SSH session of your server
type
mysql
to access MySQLnow you can use
SHOW DATABASES;
to select the proper database in the next stepin my case, it's called
wordpress
to get into the database, type
USE wordpress;
to see the current URL type
Select * from wp_options where option_name IN('siteurl','home');
for me it's
http://159.89.***.***
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';
and leave with
exit
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.