Is there any way to access wordpress site by IP address and domain as well?


I’m new with DigitalOcean and Wordpress, but I managed to build my wordpress based site guided with some tutorial on youtube and right now my site running smooth.

But I have a concern about accessing my site. Is there any way to access wordpress site not only by domain, but by ip address as well?

My wordpress is a marketplace wordpress, so I dont have any control panel to access it and no database as well.

Why I ask this, because I’m afraid I can’t access my website if my domain name expired due I will no longer have a plan to continue use it.

If we can’t do both, is there any way to access it by ip address?

I have read some articles said we can change the url of wordpress site to the ip address, but if that article was right, whic ip address I should use? IPv4 address of the droplet or floating IP?

With SSL installed on my site, I’m afraid if I change the url of wordpress to ip address, I can’t access my site. Am I wrong?

Any feedback is really appreciate and apologize if my English hard to understand.

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @nodamerah,

In your web service, you can set the website to be accessed by the droplet’s IP address as well your domain.

Since you are using the marketplace’s Wordpress, you should be using Apache as well.

Now, SSH to your Droplet and go to your /etc/apache2/sites-enabled folder. In there you’ll see two files 000-default.conf and 000-default-le-ssl.conf. In both files, you’ll need to add your Droplet’s IP address in the ServerAlias bit:


Where is the actual domain you want to use and XXX.XXX.XXX.XXX is your IP address.

You need to add your IPv4 IP address.

As for your other concerns, don’t worry, it’s not the end of the world if your domain expires, you can use hosts file on your computer to see your website and there are other possibilities. If it comes to that, you can always use the community for assistance, we’ll be happy to provide you with pointers!