wordpress not able to find homepage - php

This is the website url www.iaspirant.com .
So this will redirect to 404 page. Now the strange thing is when I do a login from wordpress wp-admin and then try to open the website then homepage gets load successfully.
So this happens only when a user is not admin.
Now in order to resolve that I googled lot and tried various approach but with no success.
tried to add 301 redirection in 404 page so that it will redirect to home page but this creates a loop
Try to delete .htaccess file but no difference
Try to change the theme to ensure whether its error in code but no success
If any one can suggest me anything then it will great help.

Try goto to /wp-admin/options-reading.php
And setup Front page displays as static page or post.

Do you have installed any maintenance plugin?
Did you check the permissions? try a permissions plugin
Go to settings->reading and see if you have set Front page displays your latests posts and not a static page

You just made a mistake in Param links:
Change your home param link to http://iaspirant.com/?page_id=428 and
then it would definitely it will wok.
Check also your static page in customization
go to apperence-->themes-->customization and set static page as your home page.

Related

Why does the page in WordPress is showing 404 errror?

I could create pages in WordPress, but whenever I take that corresponding URL
eg:BaseUrl/page-slug/
the page is not loading, also showing a 404 error. I set the permalink
hostname/%postname%/
I have used the same theme in my local it was working fine but in the server, it behaves like this. Please anyone can help me?
Would you please save permalin?
Step 1 : Goto wp-admin->setting->permalinks
Steps 2 : After save changes
This usually happens if something goes wrong with rewrite rules or your .htaccess file gets deleted. You should fix your permalink settings.
Go to Settings> Permalinks and click the Save Changes button. That should solve your problem!

wordpress disable login redirect from homepage

I have inherited a wordpress site. It's on a server and all ready to go. When I visit the url it has a redirect set up to the login page. The url looks like this:
http://www.domain.de/wp-login.php?redirect_to=%2F
I've looked in the wp-config.php with the hope of redefining the url there but no joy.
What file should I edit to remove this redirect?
Many thanks

WordPress static index page

I am editing a WordPress website, and I'd like to put a static page on index like "We're under construction". But when I edit the index.php file to show this page, I can't acess wp-login.php anymore, because it redirects me to index.php again.
I made a plugin just for that: WP Show Site by IP.
The advantage of using IP over login to filter your access is that sometimes you want to see your websites as an anonymous user rather than a logged in one (which could have different features/capabilities).

How to make Wordpress login page my home page?

I'm currently using a plugin called Members Only to restrict certain users from accessing my site by redirecting them to the wp-login.php page.
My site's login url currently looks like this:
http://localhost/home-page/login/
Every time someone accesses a page before logging in the URL changes to this:
http://localhost/home-page/login/?redirect_to=/home-page/
Is there anyway to remove the /login/ section of the URL and have the login page's URL be:
http://localhost/home-page/?
A quick way to accomplish this would be to make a .htaccess rewrite rule to make h*ttp://localhost/home-page/ actually reference http://localhost/home-page/login/ and then in the admin panel of wordpress set up a custom homepage that actually represents what you want displayed after login.

404 Page is generated instead of proper 301 redirect to new post

I changed permalink from /%postname%-%post_id%/ to /%postname%/ only. But the problem is that I can't get any method to redirect 301 old permalink to new one.
I searched google and found this plugin which redirect the old permalink to new one. When I check the HTTP Response Header, it also shows the old page is being redirected to new one but actually in the content it shows 404 page. Here is the example page.
Even when I try to fetch the page in Google webmaster tools, the bot fails to fetch the old page.
Is there any way to fix the problem??
Quickest way is just add some redirect into your .htaccess file, if you use Apache server.
You can easily populate the url list for your legacy links by write some sql query.
.htaccess
# BEGIN FIX URL
Redirect /my-sample-post-100 /my-sample-post/
Redirect /my-2nd-sample-post-101 /my-2nd-sample-post/
...
etc
# END FIX URL

Categories