Wordpress shows 404 page when saving new post or editing post
Problem is ... when I click on edit post/edit page, it tries to open http://localhost/site/wp-admin/post-108.php?post=286&action=edit and ends up on 404 page.
It also shows the 404 page when saving a new post/page.
I don't remember exactly what I did but it must have started after my IDE refactored the code when I was renaming a template file.
There is no post-108.php inside wp-admin folder or inside my theme folder, but there's post.php. I don't know why it is trying to open post-108.php which does not exist.
NOTE: It is a custom theme I am building myself using wordpress 4.7.4
Thank you all.
php wordpress wordpress-theming
add a comment |
Problem is ... when I click on edit post/edit page, it tries to open http://localhost/site/wp-admin/post-108.php?post=286&action=edit and ends up on 404 page.
It also shows the 404 page when saving a new post/page.
I don't remember exactly what I did but it must have started after my IDE refactored the code when I was renaming a template file.
There is no post-108.php inside wp-admin folder or inside my theme folder, but there's post.php. I don't know why it is trying to open post-108.php which does not exist.
NOTE: It is a custom theme I am building myself using wordpress 4.7.4
Thank you all.
php wordpress wordpress-theming
try resetting your permalink to default then try once.
– Raunak Gupta
Apr 24 '17 at 7:05
I have tried all the permalink options, not working.
– Peter O
Apr 24 '17 at 7:21
how you have generated the post edit link?
– Raunak Gupta
Apr 24 '17 at 7:29
If I directly access the link localhost/site/wp-admin/post.php?post=286&action=edit, it opens properly the post or page with post-id 286 for editing. But when I click on save button, it saves the changes then redirects to localhost/site/wp-admin/post-108.php?post=286&action=edit which does not exist.
– Peter O
Apr 24 '17 at 7:40
I think you should deactivate all the plugin then try to debug. some plugin is altering the edit post link.
– Raunak Gupta
Apr 24 '17 at 7:42
add a comment |
Problem is ... when I click on edit post/edit page, it tries to open http://localhost/site/wp-admin/post-108.php?post=286&action=edit and ends up on 404 page.
It also shows the 404 page when saving a new post/page.
I don't remember exactly what I did but it must have started after my IDE refactored the code when I was renaming a template file.
There is no post-108.php inside wp-admin folder or inside my theme folder, but there's post.php. I don't know why it is trying to open post-108.php which does not exist.
NOTE: It is a custom theme I am building myself using wordpress 4.7.4
Thank you all.
php wordpress wordpress-theming
Problem is ... when I click on edit post/edit page, it tries to open http://localhost/site/wp-admin/post-108.php?post=286&action=edit and ends up on 404 page.
It also shows the 404 page when saving a new post/page.
I don't remember exactly what I did but it must have started after my IDE refactored the code when I was renaming a template file.
There is no post-108.php inside wp-admin folder or inside my theme folder, but there's post.php. I don't know why it is trying to open post-108.php which does not exist.
NOTE: It is a custom theme I am building myself using wordpress 4.7.4
Thank you all.
php wordpress wordpress-theming
php wordpress wordpress-theming
asked Apr 24 '17 at 6:57
Peter OPeter O
2117
2117
try resetting your permalink to default then try once.
– Raunak Gupta
Apr 24 '17 at 7:05
I have tried all the permalink options, not working.
– Peter O
Apr 24 '17 at 7:21
how you have generated the post edit link?
– Raunak Gupta
Apr 24 '17 at 7:29
If I directly access the link localhost/site/wp-admin/post.php?post=286&action=edit, it opens properly the post or page with post-id 286 for editing. But when I click on save button, it saves the changes then redirects to localhost/site/wp-admin/post-108.php?post=286&action=edit which does not exist.
– Peter O
Apr 24 '17 at 7:40
I think you should deactivate all the plugin then try to debug. some plugin is altering the edit post link.
– Raunak Gupta
Apr 24 '17 at 7:42
add a comment |
try resetting your permalink to default then try once.
– Raunak Gupta
Apr 24 '17 at 7:05
I have tried all the permalink options, not working.
– Peter O
Apr 24 '17 at 7:21
how you have generated the post edit link?
– Raunak Gupta
Apr 24 '17 at 7:29
If I directly access the link localhost/site/wp-admin/post.php?post=286&action=edit, it opens properly the post or page with post-id 286 for editing. But when I click on save button, it saves the changes then redirects to localhost/site/wp-admin/post-108.php?post=286&action=edit which does not exist.
– Peter O
Apr 24 '17 at 7:40
I think you should deactivate all the plugin then try to debug. some plugin is altering the edit post link.
– Raunak Gupta
Apr 24 '17 at 7:42
try resetting your permalink to default then try once.
– Raunak Gupta
Apr 24 '17 at 7:05
try resetting your permalink to default then try once.
– Raunak Gupta
Apr 24 '17 at 7:05
I have tried all the permalink options, not working.
– Peter O
Apr 24 '17 at 7:21
I have tried all the permalink options, not working.
– Peter O
Apr 24 '17 at 7:21
how you have generated the post edit link?
– Raunak Gupta
Apr 24 '17 at 7:29
how you have generated the post edit link?
– Raunak Gupta
Apr 24 '17 at 7:29
If I directly access the link localhost/site/wp-admin/post.php?post=286&action=edit, it opens properly the post or page with post-id 286 for editing. But when I click on save button, it saves the changes then redirects to localhost/site/wp-admin/post-108.php?post=286&action=edit which does not exist.
– Peter O
Apr 24 '17 at 7:40
If I directly access the link localhost/site/wp-admin/post.php?post=286&action=edit, it opens properly the post or page with post-id 286 for editing. But when I click on save button, it saves the changes then redirects to localhost/site/wp-admin/post-108.php?post=286&action=edit which does not exist.
– Peter O
Apr 24 '17 at 7:40
I think you should deactivate all the plugin then try to debug. some plugin is altering the edit post link.
– Raunak Gupta
Apr 24 '17 at 7:42
I think you should deactivate all the plugin then try to debug. some plugin is altering the edit post link.
– Raunak Gupta
Apr 24 '17 at 7:42
add a comment |
2 Answers
2
active
oldest
votes
Go through the below steps, may resolve your issue.
First of all make sure that there is a file named as ‘post.php’ in ‘wp-admin’ folder.
Then disable all Plugins and try again. If it works, enable each Plugin one by one to discover what is causing this issue.
If the above one doesn’t help you, go to your ‘Admin > Settings > Permalinks’. Don’t change anything on that Permalinks page, but just click the button ‘Save Changes’ exists at the bottom. Now try to publish a post.
If you still experience the issue, choose the option ‘Default’ in Permalinks page then save changes. After that you can set it again to the previous permalink option or keep it as Default as you wish. Then try to publish a post.
If the problem exits however, check the “WordPress address (URL)” and “Blog address (URL)” have set correctly in ‘Settings > General’ (no slash at the end of the URLs).
After that remove the link ‘http://rpc.pingomatic.com/‘ from the field ‘Update Services’ exists at ‘Settings > Writing’ and try again to publish a post.
If problem appears yet with all above changes, copy the code given below and paste in the .htaccess file.
Code to be Added
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
In .htaccess, I added the line Redirect /library/wp-admin/post-108.php /library/wp-admin/post.php so the entire .htaccess looks like this <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /site/ RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /site/index.php [L] Redirect /site/wp-admin/post-108.php /site/wp-admin/post.php </IfModule>
– Peter O
Apr 24 '17 at 10:36
This allows me to continue working but I know the real problem is still there. None of the other solutions seem to help.
– Peter O
Apr 24 '17 at 10:43
add a comment |
I have not sorted this real solution as none of the above has worked for me. I do have work around.. If you can get to the Pages in the dashboard but the Posts gives you a 404 then just go to the Pages and replace the querysting.
https://YOURDOMAIN.com/wp-admin/edit.php?post_type=page
change to:
https://YOURDOMAIN.com/wp-admin/edit.php?post_type=post
This was also my issue. I had to change my url from&post_type=post
to&post_type=portfolio
– elit3x
Nov 24 '18 at 1:47
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f43581655%2fwordpress-shows-404-page-when-saving-new-post-or-editing-post%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Go through the below steps, may resolve your issue.
First of all make sure that there is a file named as ‘post.php’ in ‘wp-admin’ folder.
Then disable all Plugins and try again. If it works, enable each Plugin one by one to discover what is causing this issue.
If the above one doesn’t help you, go to your ‘Admin > Settings > Permalinks’. Don’t change anything on that Permalinks page, but just click the button ‘Save Changes’ exists at the bottom. Now try to publish a post.
If you still experience the issue, choose the option ‘Default’ in Permalinks page then save changes. After that you can set it again to the previous permalink option or keep it as Default as you wish. Then try to publish a post.
If the problem exits however, check the “WordPress address (URL)” and “Blog address (URL)” have set correctly in ‘Settings > General’ (no slash at the end of the URLs).
After that remove the link ‘http://rpc.pingomatic.com/‘ from the field ‘Update Services’ exists at ‘Settings > Writing’ and try again to publish a post.
If problem appears yet with all above changes, copy the code given below and paste in the .htaccess file.
Code to be Added
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
In .htaccess, I added the line Redirect /library/wp-admin/post-108.php /library/wp-admin/post.php so the entire .htaccess looks like this <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /site/ RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /site/index.php [L] Redirect /site/wp-admin/post-108.php /site/wp-admin/post.php </IfModule>
– Peter O
Apr 24 '17 at 10:36
This allows me to continue working but I know the real problem is still there. None of the other solutions seem to help.
– Peter O
Apr 24 '17 at 10:43
add a comment |
Go through the below steps, may resolve your issue.
First of all make sure that there is a file named as ‘post.php’ in ‘wp-admin’ folder.
Then disable all Plugins and try again. If it works, enable each Plugin one by one to discover what is causing this issue.
If the above one doesn’t help you, go to your ‘Admin > Settings > Permalinks’. Don’t change anything on that Permalinks page, but just click the button ‘Save Changes’ exists at the bottom. Now try to publish a post.
If you still experience the issue, choose the option ‘Default’ in Permalinks page then save changes. After that you can set it again to the previous permalink option or keep it as Default as you wish. Then try to publish a post.
If the problem exits however, check the “WordPress address (URL)” and “Blog address (URL)” have set correctly in ‘Settings > General’ (no slash at the end of the URLs).
After that remove the link ‘http://rpc.pingomatic.com/‘ from the field ‘Update Services’ exists at ‘Settings > Writing’ and try again to publish a post.
If problem appears yet with all above changes, copy the code given below and paste in the .htaccess file.
Code to be Added
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
In .htaccess, I added the line Redirect /library/wp-admin/post-108.php /library/wp-admin/post.php so the entire .htaccess looks like this <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /site/ RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /site/index.php [L] Redirect /site/wp-admin/post-108.php /site/wp-admin/post.php </IfModule>
– Peter O
Apr 24 '17 at 10:36
This allows me to continue working but I know the real problem is still there. None of the other solutions seem to help.
– Peter O
Apr 24 '17 at 10:43
add a comment |
Go through the below steps, may resolve your issue.
First of all make sure that there is a file named as ‘post.php’ in ‘wp-admin’ folder.
Then disable all Plugins and try again. If it works, enable each Plugin one by one to discover what is causing this issue.
If the above one doesn’t help you, go to your ‘Admin > Settings > Permalinks’. Don’t change anything on that Permalinks page, but just click the button ‘Save Changes’ exists at the bottom. Now try to publish a post.
If you still experience the issue, choose the option ‘Default’ in Permalinks page then save changes. After that you can set it again to the previous permalink option or keep it as Default as you wish. Then try to publish a post.
If the problem exits however, check the “WordPress address (URL)” and “Blog address (URL)” have set correctly in ‘Settings > General’ (no slash at the end of the URLs).
After that remove the link ‘http://rpc.pingomatic.com/‘ from the field ‘Update Services’ exists at ‘Settings > Writing’ and try again to publish a post.
If problem appears yet with all above changes, copy the code given below and paste in the .htaccess file.
Code to be Added
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Go through the below steps, may resolve your issue.
First of all make sure that there is a file named as ‘post.php’ in ‘wp-admin’ folder.
Then disable all Plugins and try again. If it works, enable each Plugin one by one to discover what is causing this issue.
If the above one doesn’t help you, go to your ‘Admin > Settings > Permalinks’. Don’t change anything on that Permalinks page, but just click the button ‘Save Changes’ exists at the bottom. Now try to publish a post.
If you still experience the issue, choose the option ‘Default’ in Permalinks page then save changes. After that you can set it again to the previous permalink option or keep it as Default as you wish. Then try to publish a post.
If the problem exits however, check the “WordPress address (URL)” and “Blog address (URL)” have set correctly in ‘Settings > General’ (no slash at the end of the URLs).
After that remove the link ‘http://rpc.pingomatic.com/‘ from the field ‘Update Services’ exists at ‘Settings > Writing’ and try again to publish a post.
If problem appears yet with all above changes, copy the code given below and paste in the .htaccess file.
Code to be Added
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
answered Apr 24 '17 at 8:37
User7855069User7855069
1865
1865
In .htaccess, I added the line Redirect /library/wp-admin/post-108.php /library/wp-admin/post.php so the entire .htaccess looks like this <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /site/ RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /site/index.php [L] Redirect /site/wp-admin/post-108.php /site/wp-admin/post.php </IfModule>
– Peter O
Apr 24 '17 at 10:36
This allows me to continue working but I know the real problem is still there. None of the other solutions seem to help.
– Peter O
Apr 24 '17 at 10:43
add a comment |
In .htaccess, I added the line Redirect /library/wp-admin/post-108.php /library/wp-admin/post.php so the entire .htaccess looks like this <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /site/ RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /site/index.php [L] Redirect /site/wp-admin/post-108.php /site/wp-admin/post.php </IfModule>
– Peter O
Apr 24 '17 at 10:36
This allows me to continue working but I know the real problem is still there. None of the other solutions seem to help.
– Peter O
Apr 24 '17 at 10:43
In .htaccess, I added the line Redirect /library/wp-admin/post-108.php /library/wp-admin/post.php so the entire .htaccess looks like this <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /site/ RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /site/index.php [L] Redirect /site/wp-admin/post-108.php /site/wp-admin/post.php </IfModule>
– Peter O
Apr 24 '17 at 10:36
In .htaccess, I added the line Redirect /library/wp-admin/post-108.php /library/wp-admin/post.php so the entire .htaccess looks like this <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /site/ RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /site/index.php [L] Redirect /site/wp-admin/post-108.php /site/wp-admin/post.php </IfModule>
– Peter O
Apr 24 '17 at 10:36
This allows me to continue working but I know the real problem is still there. None of the other solutions seem to help.
– Peter O
Apr 24 '17 at 10:43
This allows me to continue working but I know the real problem is still there. None of the other solutions seem to help.
– Peter O
Apr 24 '17 at 10:43
add a comment |
I have not sorted this real solution as none of the above has worked for me. I do have work around.. If you can get to the Pages in the dashboard but the Posts gives you a 404 then just go to the Pages and replace the querysting.
https://YOURDOMAIN.com/wp-admin/edit.php?post_type=page
change to:
https://YOURDOMAIN.com/wp-admin/edit.php?post_type=post
This was also my issue. I had to change my url from&post_type=post
to&post_type=portfolio
– elit3x
Nov 24 '18 at 1:47
add a comment |
I have not sorted this real solution as none of the above has worked for me. I do have work around.. If you can get to the Pages in the dashboard but the Posts gives you a 404 then just go to the Pages and replace the querysting.
https://YOURDOMAIN.com/wp-admin/edit.php?post_type=page
change to:
https://YOURDOMAIN.com/wp-admin/edit.php?post_type=post
This was also my issue. I had to change my url from&post_type=post
to&post_type=portfolio
– elit3x
Nov 24 '18 at 1:47
add a comment |
I have not sorted this real solution as none of the above has worked for me. I do have work around.. If you can get to the Pages in the dashboard but the Posts gives you a 404 then just go to the Pages and replace the querysting.
https://YOURDOMAIN.com/wp-admin/edit.php?post_type=page
change to:
https://YOURDOMAIN.com/wp-admin/edit.php?post_type=post
I have not sorted this real solution as none of the above has worked for me. I do have work around.. If you can get to the Pages in the dashboard but the Posts gives you a 404 then just go to the Pages and replace the querysting.
https://YOURDOMAIN.com/wp-admin/edit.php?post_type=page
change to:
https://YOURDOMAIN.com/wp-admin/edit.php?post_type=post
edited Nov 24 '18 at 6:28
answered Apr 27 '18 at 0:26
EnkodeEnkode
2,67422138
2,67422138
This was also my issue. I had to change my url from&post_type=post
to&post_type=portfolio
– elit3x
Nov 24 '18 at 1:47
add a comment |
This was also my issue. I had to change my url from&post_type=post
to&post_type=portfolio
– elit3x
Nov 24 '18 at 1:47
This was also my issue. I had to change my url from
&post_type=post
to &post_type=portfolio
– elit3x
Nov 24 '18 at 1:47
This was also my issue. I had to change my url from
&post_type=post
to &post_type=portfolio
– elit3x
Nov 24 '18 at 1:47
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f43581655%2fwordpress-shows-404-page-when-saving-new-post-or-editing-post%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
try resetting your permalink to default then try once.
– Raunak Gupta
Apr 24 '17 at 7:05
I have tried all the permalink options, not working.
– Peter O
Apr 24 '17 at 7:21
how you have generated the post edit link?
– Raunak Gupta
Apr 24 '17 at 7:29
If I directly access the link localhost/site/wp-admin/post.php?post=286&action=edit, it opens properly the post or page with post-id 286 for editing. But when I click on save button, it saves the changes then redirects to localhost/site/wp-admin/post-108.php?post=286&action=edit which does not exist.
– Peter O
Apr 24 '17 at 7:40
I think you should deactivate all the plugin then try to debug. some plugin is altering the edit post link.
– Raunak Gupta
Apr 24 '17 at 7:42