0

I moved my website from localhost to web server. The website works fine. When I explore any page the urls on the website(front-end) are working fine so permalinks are not a problem. Issue is when I click on "Pages" inside url/wp-admin it shows me a not found 404 page.

I figured out the issue is when I click on the pages the url should be:

/wp-admin/edit.php?post_type=page

but when I click the pages it takes me to

/wp-admin/edit?post_type=page

the url automatically removes .php from /wp-admin/edit.php?post_type=page

enter image description here

Even when I manually add .php after edit it is deleted automatically.

I've commented/deleted everything in my htaccess file still it automatically removes .php from edit.php?post_type=page

All other pages are working fine Posts, Category, Media etc. When I click Posts the url it takes me to the following url which is working fine and in this case .php isn't removed automatically

wp-admin/edit.php

Things I've tried:

-Commenting everything in htaccess file.

-Deleting htaccess file.

-Uploading a fresh copy of my localhost wordpress website on server (It works fine on local host)

Summary:

enter image description here

When I click pages in wp-admin I get 404 not found. The reason is the url should be /wp-admin/edit.php?post_type=page but the .php from edit.php?... is automatically removed. All other links are working fine. Posts page url wp-admin/edit.php shows correctly and the .php is not being removed automatically. Anyway I can fix it generally or by changing htaccess file?

  • Have you edited WP core? You mention a HTAccess file but haven't provided a copy in your question. Additionally, do the links themselves lack the .php or is the .php version being redirected ot the non-php version? Keep in mind that permalinks are for the frontend, and aren't used or available in WP Admin so permalinks and WP rewrite rules are irrelevant here – Tom J Nowell Jul 15 at 11:35
  • @TomJNowell The reason I didn't mention htaccess file is because I deleted the file and it made no difference. The link of Pages page contains .php but it is being redirected to the non-php. All menu items Posts, Uploads etc have .php in links and are opening fine. Not being re-directed to non-php. Only pages page is the issue. – Moiz Nadeem Jul 15 at 11:37

Your Answer

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

Browse other questions tagged or ask your own question.