Accessing WP admin of a multisite with expired dom

2019-09-02 17:59发布

问题:

I got a multisite network, and got subsites on it, unfortunately the main domain has expired, and I cannot access my WP admin. I don't worry about the main site but I need to have the subsite.

I am able to access the main site using the IP but not its WP admin. I tried following this but it didn't help. I saw a way via accessing database (this method) but I couldn't access database as its hosted in Digital Ocean, it's pretty hard without a control panel.

  1. want a way to access main sites WP admin
  2. access my subsite via URL (it has a separate domain which is being masked)

回答1:

If your domain has expired, ordinary DNS will not work. This means that domain-based hosting on the web server will no longer operate as well.

However, you can easily trick your local machine into thinking the domain still exists. This will work on Linux and OS X. You'll need to know the IP address of your web server - if you do not have this, you'll have this in the welcome emails you've received from your web host, or perhaps by logging onto your customer control panel.

Edit your /etc/hosts/ file. In a blank link at the end, add this:

yourdomain.tld    1.2.3.4

where 1.2.3.4 is your IPv4 address. The gap between the two can be any number of spaces or tabs.

Once this file is saved, you should be able to ping it thus, in a console or terminal utility:

ping yourdomain.tld

and it will show you what IP address you have assigned it to.

You can then access it normally. Bear in mind, though, that only you have the DNS information, so it will not work on any other machine. It will however allow you to access your WordPress control panel.