When installing WordPress, the domain specified by the user is saved in the site’s settings and is subsequently used for managing the website and adding new content.
As a result, the database accumulates numerous entries containing the original domain name.
When transferring the site to a new domain, all internal links will continue to point to the old domain.
To fix this issue, log in to «phpMyAdmin» through your control panel and select your site’s database from the sidebar:
Go to the «Export» tab:
Click the «Next» button and wait for the .sql file to finish downloading.
Open the downloaded file in a text editor. We recommend using «Notepad++» for this purpose.
You can download «Notepad++» from the following link: https://notepad-plus-plus.org/downloads/
In «Notepad++», press the CTRL+F key combination. In the window that opens, navigate to the «Replace» tab:
In the «Find» field, enter your site's current domain name. In the «Replace with» field, enter the new domain name. Then, click the «Replace All» button:
After completing the replacements, close the «Replace» window and save your changes by clicking the «Save» icon or pressing CTRL+S.
Return to "phpMyAdmin" and go to the "Structure" tab:
The database needs to be cleared before uploading the new data. To do this, scroll to the bottom of the page, click «Check All», and select «Delete» from the dropdown menu.
Confirm deletion:
Next, go to the «Import» tab:
Upload the edited *.sql file by clicking the «Choose File» button, then click the «Next» button:
Wait for the import to complete; this may take some time:
Check the functionality of your website.