0

Today I migrated a WordPress site from another server to a new server, there is a new domain and new host, so I follow the manual way to upload my site. That was, I downloaded files and upload it on to new fresh host and, database export and import to the new host. After that, I have changed site URL, home page URL in the database, so site looked fine.

But when I try to edit a page, that my back end editing redirects me to 404 page not found. But this issue is only for some old pages while making new page has no issues whatsoever.

After that, I changed all the past domain record matching database records and replace them with the new domain name. Still, I cannot edit my pages.

I tried all the listed ways like .htaccess, permalinks reset, deleting the .htacess and resetting permalinks, but none of that has worked.

Please help me out is very frustrating

  • You tagged your question as wordpress.com, are you sure this is a wp.com site? If so you should contact wordpress.com support – Tom J Nowell May 28 '19 at 17:48
0

WordPress stores the domain in a lot of places - not just the options table - and in many places it's serialized, so if the new domain does not have the same number of characters as the old domain, a lot of things can break if you try to manually search and replace.

You can either use a tool like WP-CLI, or look for a database migration plugin. The plugins tend to be the quickest, easiest way unless you're already familiar with WP-CLI. Some hosts also provide migration services, so you might want to leave it to them if they provide the service for free.

0

This problem is because of your old database file still having traces of your old domain. Before uploading your database file to your new domain/website, you should manually replace every occurrence of your old domain with the new domain.

You should also edit your wp-config.php file, and add these lines.

define( 'WP_HOME', 'http://newdomain.com' );
define( 'WP_SITEURL', 'http://newdomain.com' );

You should also read the official documentation for changing the site URL.

  • same result, no change. – Sahan Pasindu Nirmal May 28 '19 at 21:57
  • Make sure you have replaced every occurrence of your old domain from database file before uploading it to new domain. Also, be sure that your new domain is correctly/exactly set on wp general settings. – Deepak Singh May 28 '19 at 22:02
  • i have changed every single database instance which belongs to old domain. already did those are. still, I have this problem – Sahan Pasindu Nirmal May 28 '19 at 22:04
  • You should recheck, Your old database is the only file which could have traces of your old domain. And if you have used WordPress exported XML file to import posts, make sure you have replaced your old domain there as well. In the end, you should perform a database repair on the new domain. – Deepak Singh May 28 '19 at 22:18
  • " WordPress exported XML file to import posts " What is the XML file you are talking? – Sahan Pasindu Nirmal May 28 '19 at 22:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.