Be careful with these kind of actions, you could be replacing the URL on files where you should not do it.
You should be able to edit those file through the Admin Panel if you did not change anything else. Could you please confirm that you have the property
FS_METHOD configured as described below at
As explained at https://codex.wordpress.org/Editing_wp-config.php:
FS_METHOD forces the filesystem method. It should only be "direct", "ssh2", "ftpext", or "ftpsockets". Generally, you should only change this if you are experiencing update problems. If you change it and it doesn't help, change it back/remove it.
We set it to "direct" by default and as long as the user "daemon" has writing permission on the files you want to edit, you should be able to edit them from the Admin Panel.