redirect - Page editing in backend redirecting to 404 page not found with url post.php

admin2025-01-07  5

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

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

Share Improve this question edited May 28, 2019 at 19:11 fuxia 107k38 gold badges255 silver badges459 bronze badges asked May 28, 2019 at 17:36 Sahan Pasindu NirmalSahan Pasindu Nirmal 1031 silver badge8 bronze badges 1
  • 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 Commented May 28, 2019 at 17:48
Add a comment  | 

2 Answers 2

Reset to default 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.

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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736253347a117.html

最新回复(0)