Check if you are using custom url for admin and disable the use_custom in database:
select * from core_config_data where path like '%admin/url/%%'
| admin/url/custom | default | 0 | https://www.yourlivesite.com/admincustom/ |
| admin/url/use_custom | default | 0 | 1 |
| admin/url/use_custom_path | default | 0 | 0
set them to
| admin/url/custom | default | 0 | https://www.localurl.com/admin/ |
| admin/url/use_custom | default | 0 | 0 |
| admin/url/use_custom_path | default | 0 | 0
Do :
bin/magento cache:flush
bin/magento setup:upgrade
bin/magento setup:static-content:deploy