Question

Trouble pointing namecheap domain to wordpress droplet.

I set up the wordpress droplet and it works 100% as ip.ip.ip.ip

I’ve changed my nameservers on namecheap to ns1.digitalocean.com (and ns2 & ns3)

I have the following DNS records on DigitalOcean: CNAME www.example.com - is an alias of example.com (43200), NS example.com - directs to ns1.digitalocean.com. (and ns2-3) (1800), — btw does that . at the end belong there? A example.com - directs to ip.ip.ip.ip (3600)

I also changed WordPress Address (URL) & Site Address (URL) to https://www.example.com but now I can’t access my wordpress site on this doman or ip.

Anything else I need to do or add in DNS or something?

Subscribe
Share

@tuzigou you can edit it from terminal by using the nano wp-config.php command (change it to point to the correct file if you’re not in the /var/www folder, it will give you access to the nano editor.

I followed this to change the mysql but it still didn’t work https://blog.khophi.co/change-wordpress-site-url-via-command-line-mysql/

I can’t figure out how to edit wp_config.php from terminal.

change your wp site url from mysql database


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hi @tuzigou,

First make sure your domain does actually point to your droplet. You can do so by pinging it

ping domain.com

Check the result and if the result is correct.

If the IP is correct then you’ll need to point your attention to your configuration. Firstly, check your database as the previous comments have suggested. Check in your wp_options table in your database and see what does the two rows home and site_url. You shouldn’t have to edit your wp-config.php to hardcode your domain.

Regards, Kalin