If you like DNray Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

Moving a WordPress Site to a New Domain

Started by marclewis, Jan 18, 2024, 12:33 AM

Previous topic - Next topic

marclewisTopic starter

Good greetings to all!

I've taken a decision to transfer the website to a new domain, got it issued, registered DNS, and "lifted" the site on hosting. And now I've encountered an issue:

How can I properly transfer the database? The website is built on WordPress.

The only method that worked well for me was launching a new domain with the old domain's database. As a result, everything looks and functions just like before from the user's perspective, except the URL in the address bar is different.

However, I'm unable to access the admin area of the new site. Whenever I try to log in, it redirects me to the admin area of the old domain. Although I can write articles, any attempts to make changes or configure settings through the admin section only affect the old domain's site.

Importing the entire database into a new one resulted in strange occurrences similar to what I've described, although it's quite unclear what and where things are located.

What is the correct method for transferring the database?

I'm sure this question has been discussed numerous times before; if the exact solution is already available, I'd appreciate seeing the link as I couldn't find it myself.
  •  


Elyman

It's crucial to update the site URL within the WordPress database. This can be done by accessing the database through phpMyAdmin or a similar tool, locating the `wp_options` table, and updating the `siteurl` and `home` values to reflect the new domain.
Additionally, you will need to update any hardcoded internal links within post/page content and theme files. These links may still point to the old domain and need to be modified to reference the new domain.

To ensure a smooth transition, it's advisable to use a search and replace tool to update all occurrences of the old domain within the database. There are reliable WordPress plugins available that can handle this task efficiently and prevent issues such as being unable to access the admin area of the new site.

In some cases, after updating the database and ensuring all internal links are pointing to the new domain, clearing the WordPress cache and browser cache is necessary to see the changes reflected accurately.

Regarding your specific issue with being unable to access the admin area of the new site, it's essential to double-check if any hard-coded URLs are still pointing to the old domain. Furthermore, verify that the WordPress address (URL) and Site address (URL) in the General Settings of the WordPress dashboard match the new domain.

If importing the entire database into a new one resulted in unexpected behavior, it could indicate issues with the export/import process or incomplete search and replace operations.
The correct method for transferring the database involves updating the site URL within the database, modifying internal links, utilizing search and replace tools, clearing caches, and ensuring all WordPress settings reflect the new domain. By following these steps meticulously, you should be able to avoid issues with the admin area and have a successful transfer to the new domain.
  •  

messnct

I'd like to share with you the process of transferring a WordPress website, which involves several stages. One of the crucial steps is working with the database, where the URLs of the old domain are updated to reflect the new domain.

Here are some useful articles to guide you through the process:

- The official WordPress documentation on moving WordPress: http://codex.wordpress.org/Moving_WordPress
- A discussion on the WordPress support forum about changing the domain name using phpMyAdmin: https://wordpress.org/support/topic/how-to-change-wordpress-domain-name-using-phpmyadmin
  •  

Kaustubh

I'd like to share the correct method for transferring the WP database. First, ensure you have a backup of your database and all necessary files. Next, create a new database on the destination server and import the backup into it using a tool like phpMyAdmin or command line. Once the import is complete, update the database connection details in the wp-config.php file to reflect the new database name, username, and password.

After updating the configuration, use a search and replace tool to update any hard-coded links or paths in the database that may have changed due to the migration. This step is crucial to ensure that your website functions properly on the new server. Finally, test the website thoroughly to confirm that the database transfer was successful and that all links, images, and content are loading correctly.
  •  


If you like DNray forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...