Community Forums › Forums › Archived Forums › General Discussion › Redirection in PHP Code
- This topic has 8 replies, 3 voices, and was last updated 9 years, 10 months ago by Tonje.
-
AuthorPosts
-
January 12, 2015 at 12:09 am #137137TonjeMember
Hello,
We realized that our site is really really slow. We did a few things that helped improving it, one was to deinstall W3 Total Cache and install WP Super Cache instead. That was a recommendation from our Web host. Amazing how that improved.Another recommendation from the web host was a default PHP code in WordPress that is forwarded http://iexcelbooks.no/ to http://www.iexcelbooks.no/. They say that the issue is software we have installed, which mean WP i guess. "We recommend that you do not do forwarding in this way, if you do not want it to stand http://iexcelbooks.no/ address field, you should ensure that no redirection in PHP code". As this is "over my head" we had someone to look at it, but could only find redirection from older version of wordpress and not the current we use.
Anyone out there who can advice us how to move forward with this issue? Is it a known problem?
Happy for advice and/or to get in touch with an expert
Thanks
http://iexcelbooks.noJanuary 12, 2015 at 1:49 am #137139Brad DaltonParticipantJanuary 12, 2015 at 2:14 am #137140TonjeMemberThanks for the reply. Someone told me that that might not be the right thing to do. I wonder how i know...?
Might not be harmfull to try..?January 12, 2015 at 9:57 am #137176BadlywiredMemberIf it is a slow overloaded shared server without any PHP caching then the PHP redirect could be a factor.
You should check out http://www.webpagetest.org to analyse what is slow. However, normally slow hosts are the biggest issue and can be solved by paying more for your service.
My techy blog WordPress and stuff badlywired.com
January 14, 2015 at 12:03 am #137384TonjeMemberThanks for your reply. I actually can not see or know if we need a php redirect. I can not find out if that is the issue in the webpagetest either. The host is blaming wp for a redirect and not themselves.
January 14, 2015 at 2:19 am #137392BadlywiredMemberYes, they are correct, WordPress will internally redirect http://www.mydomain.com to mydomain.com or visa versa using PHP based on the URL settings in general>settings (or wp-config.php).
The redirect is very important for SEO purposes otherwise you have in effect 2 SEPARATE websites with the same content, http://www.mydomain.com is a different sub domain to mydomain.com.
To avoid this PHP redirect, add the redirect to your .htaccess (there are tons of examples / how to do it on Google )
Apply the .htaccess redirect
Then your host won't be able to claim then that is an issue, but I doubt it will really improve speed, but it is one less excuse from your host.
My techy blog WordPress and stuff badlywired.com
January 18, 2015 at 6:25 am #137846TonjeMemberThanks for your advices. We did redirect to .htaccess. You were right Badlyweird...It did not really improve the speed. I guess the only thing now is to get back to the host an complained that "they" are the issues and need to be solved. ?
Thanks
Tonje
January 18, 2015 at 6:43 am #137847BadlywiredMemberAlthough you say you realised your site is slow, when using it (from London UK) it certainly doesn't feel slow.
And if you are paying only 30 Krone a month, for shared hosting (about USD 3.50) then the host is reasonable.
There are things you can do see
https://developers.google.com/speed/pagespeed/insights/
and
http://gtmetrix.com/reports/www.iexcelbooks.no/byuLZ21i
for some ideasSimplest thing to do is implement browser caching. I'll write a blog post on my blog and link it up.
-- edit--
Here it is http://badlywired.com/2015/01/speed-wordpress-website/
My techy blog WordPress and stuff badlywired.com
January 19, 2015 at 11:27 pm #138013TonjeMemberThanks a lot. I will definitely read your blog in a few.
Thank you also for testing our page.
The Domenehost said there were a few issues on our website that slows down our site:
Google APIs (fonts)
Google Analytics (sets cookies)
Facebook (set cookies!)admin-ajax.php (local)
I wonder if they actually mean that i need to remove or replace with other plugins? We just remove an iframe facebook to make it faster, with just a link, google analytics we need but is there another ways to set it up maybe?
I read a little bit about the admin-ajax but that is already included in the wordpress i believe, so how can that be solved?
Thanks a lot.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.