Please follow the below steps:
Step 1: First secure the back up of your config file in your local,
Step 2: Target below 2 files:
Step 3: Replace the new URL with old one.
Step 4: Modify the define DIR to correct path.
Step 5: Keep as it is the database config if no changes has been made.
Step 6: Save the changes you have made.
Step 7: Open your Opencart shopping cart with new URL in web browser.