Wordpress Permalink issue on subdirectory wordpress - wordpress

I have installed wordpress inside one folder called blog. when we open the blog, the blog links are broken 404 page error. How do i fix this issue, if its installed on root directory it will work, but this time it is directory, Is there any way to fix this issue

Normally such issues can be fixed easily by refreshing your permalinks. To do that go to WP > Settings > Permalinks and click on the save button once.
On some servers it is not allowed to edit .htaccess by clicking save in that section, therefore if you get an error; contact your hosting provider.
You may also want to check that the URL of your site corresponds to the URLs shown inside of WP > Settings > General.

First ensure your server support rewrite_ module
1.Login your WordPress dashboard
2. Click Settings
3.click Permalinks and change your permalink then click save

Related

Wordpress 5.0.3 - "Updating failed" and "Publishing failed". Console log shows a 404 on /blog/wp-json/wp/v2/posts/1177/autosaves?_locale=user

I updated Wordpress to the latest version (5.0.3). Now, any time I try to post I get a red message that says "Publishing failed". If I try to save a draft I get "Updating failed".
In console, I'm seeing
https://mydomain/com/blog/wp-json/wp/v2/posts/1177/autosaves?_locale=user 404
When I test the URL with /wp-json/wp/v2/posts/ I get a 404. If i use ?rest_route=/wp/v2/posts/ instead, I get my blog. I'm using Post name for permalinks.
Is there a way I can change the WordPress editor to use the rest route that is working? Or can I change something in my Nginx config?
two easy solutions:
You should deactivate the security plugin, in my case problem was with Advanced Access Manager plugin that I deactivate it and problem fixed.
Use the Classic Editor plugin By WordPress Contributors, just install this plugin and use the Classic editor, here is the setting that you can use both classic and block editor.
Setting->Writing->Allow users to switch editors
then in the create page, you have this option
For block editor => Switch to Classic Editor
And Classic editor => Switch to Block Editor
I changed my Permalink to Plain, then it's working, else it's throwing the same error!
I guess this has something to do with permalinks and how url is rewritten. once I change my permalinks option to plain everything seems fine. I'm using a local install with nginx. hopefully will find out why this happens later.
I had a similar problem with WordPress 5.2.2. I couldn't save or publish a page (new or old). Although all requests in the page editor return 200 I realized that some requests had a request domain of my site and others a request domain of the hosting company. So, I went to Settings > General and changed the settings Site Address (URL) and WordPress Address (URL) to be the same value (I copied the value of Site Address (URL) into WordPress Address (URL)) and that fixed the problem with the editor.
Step 1: Open the WordPress and login as administrator. When you post new content or older content you will be getting error message.
Step 2: So, now choose the older version of Editor of WordPress instead to use new version. To choose older version go to settings and then click on writings. Here you can find option "Classic Editor" and if you will not find option then choose second option.
This is one option but if you are not fixed with this option choose second option such as
Open the WordPress and on the left side you have list of tasks to be performed in WordPress. Click on the option “Plugin” and you will be opened with the plugin screen. On the top of the screen, you have the button “add new”.
Step 3: After clicking on the add new button, new screen will be opened. There, you can see classic editor plugin. Kindly, download and install it. Once it is installed, then activate it by clicking on the “activate” button.
Step 4: Again, go the Settings option and click on the Writing. In the Writing section, you have many options such as formatting, default post category, default post format, default editor for all users, allow users to switch editors, post via email etc.
Click on the classic editor choice in default editor for all users. This makes you to work easy on content posting newly or updating the previous contents.
With wp cli:
wp core update (get the latest version)
wp plugin update --all (why not update plug ins too)
wp plugin install classic-editor (get this)
wp plugin activate classic-editor (activate)
When we get 404 in wordpress pages and publishing failed there could be an issue with .htaccess file.
Update your Permalink settings and check .htaccess file, If .htaccess file is exist, and it's correct, confirm in your server .conf file have
Or your .htaccess file is not able to override server configuration
<Directory /var/www/web-app-wordpress>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
Restart apache server after updating this code.

Issue On Displaying Pages with Post Name Permalink

I have a simple Theme like below
Right now when I navigate to localhost and site root directory I am able to see content from header.php , footer.php and page.php.
then, I simply generated some pages for Navigation bar and to get a better URL I updated the permalink from default to Post Name format
Now while I have the the clean Ur as: Permalink: http://localhost/RumiPress/eyeglasses/
But when I click to view the page I am getting
I Google this and find some hints about the (.htaccess) so I just copied same format as Cedex
but still getting same result. Can you please let me know why this is happening?
Thanks
Apache's mod_rewrite module needs to be enabled in order for "pretty" permalinks to work in WordPress, as specified in the codex.
You're using WAMP, so this can be done by:
LEFT click on the green WAMP icon in your notification tray
Click on Apache --> Apache modules
Enable rewrite_module (make sure it's checked)

Moving Wordpress site subdirectory errors

I have just moved my testing development subdirectory worpdress installation to my root folder using the WP-Clone plugin.
The problem now is my main site (previously mysite.com ) shows (mysite.com/site) now. and the subdirectory is shwoing in all my links
I have tried going to settings and removed the /site from wordpress URL and Site address URL.
But it broke my site and disabled me from accessing my wp-login.php .
I fixed it by editing my wp-config.php and adding :
define('WP_HOME','https://mysite.com/site');
define('WP_SITEURL','https://mysite.com/site');
and now my website works perfectly. But it still shows mysite.com/site and i am unable to edit my URL and Siteaddress from my wp dashboard anymore.
How do I Remove my website subdirectory (/site) and still have it work and not break my site's themes and all? How do I go about this? Really really appreciate any help! Thanks!
By adding those constants to wp-config.php you're overruling any setting in the database. That's why you can't edit them in the admin panel.
So the first step is to change those constants to:
define('WP_HOME','https://domain.com');
define('WP_SITEURL','https://domain.com');
Then delete your htaccess file. (.htaccess in your root folder).
Once you've done this navigate to http://domain.com/wp-login.php
Login to your site and go to Settings -> Permalinks. Hit save which will regenerate your htaccess file.
Finally you'll need to update existing links. I'd suggest installing a plugin called 'Velvet Blues Update URLs'.

WordPress on add-on domain

I have installed WordPress on an add-on on BlueHost. The addon domain is linked to a sub-folder of the main domain FTP, called addondomain-folder.
When I go to addondomain.com, the WP site displays ok.
The problem is with the wp-admin panel. The panel displays incorrectly, has broken links to all images and stylesheets and I can not access any area as I always get redirected to: addondomain.com/addondomain-folder/wp-admin/... instead of addondomain.com/wp-admin/
I have checked the wp-options table in the database and both siteurl and home are set to addondomain.com
Any solutions to stop wp-admin thinking it is in a subfolder?
Ok, the problem was a hidden .htaccess file which messed everything up.

wordpress page permalink is not working on local

I have wordpress website on server, created pages and that's working fine, but when I download wordpress files and DB on local and want to run with localhost, permalinks for pages are not working.
It seems this is an old post, but this might help others that encounter same error.
Select:
Apache –> Apache Modules –> and that will display the lists of available modules.
Now just check rewrite_module.
source from WordPress Custom Permalink not Working in Localhost
Hope that helps.
Sometimes when copying from one server to another, wordpress' permalinks goes a little screwy, try setting them back to default (using the admin panel) and then setting them again to your desired permalink structure (being sure to apply the changes each time).
you need to go into the database and change a few options.
Goto your phpmyadmin installation and navigate to wp-options table. Change the siteurl and home options to your localhost address.
Wordpress needs these database tries to build your permalinks. If they are wrong, then it will direct your links to incorrect locations.
You can simply fix this by doing the following:
Go to settings in your WordPress site.
click on permalinks ( You will see the URL structures of your newly configured WP site. (if it shows your original website values, go to settings-> general and set your local site URLs
Don't do any changes, just click on the Save button.
Refresh your local site and click on your page link or post.

Resources