I am creating web portal in WordPress for that I am using i-craft WordPress theme. But my website page loading very slow at initial load that is before loading of all content. Its taking 8 - 10 sec to initial load. I know this is happening due to lots php code with lots of functions and loops. I want to remove all unnecessary code or php file. As my website belongs to only single theme and I don't want to add post functionality etc. so which file/php code/information in database I have to remove that will helps website to load initially faster. Or is there any way to make loading very fast without removing code or files.
You can use
https://gtmetrix.com
on here you can check your site analytic report .and you want to do minify your css and js file.and also images .
Related
The title basically says it. I currently have my home page with the HTML sitting in the classic editor box. Should I move that to front-page.php? I know that it doesn't REALLY matter, and it won't have a huge impact, but I am being meticulous about creating a speedy website. So which is faster?
Also, I am currently using 2 separate PHP files for headers. One on the home page, and one for the rest. Should I just hard code the header for the home page into the same place as the home page HTML since it's the only page that uses it?
I'm pretty new to PHP, but I've searched Google extensively and can't seem to find my answer. Using WordPress. Really appreciate your help!
For speeding up the website, no need to change the home page or the header file. please do the following things for speeding up the website
Optimise your images
Enable caching
Enable GZIP compression
Minify CSS, HTML & JS files
Update plugins
Clean-up your database
Moving the html code to a template file will improve the site speed because WordPress will not have to retrieve those html tags from the database. And it is conventional and actually a good practice to place all rendering code (html, css, js) to the template or theme files where they should be, instead of directly adding them in the backend or instead of including them directly in the post editor.
I want to make page cache of static pages in my WordPress theme (and basically I know how to implement it)
The problem is that when making theme - the first time when I "get any control" about what is happening is inside functions.php file of theme, and this file is loaded about 1 sec after request starts (before it is loading all wordpress functions stuff, I quess some sql - but I dont need that all as I'm using page cache, just want to render saved html - btw. thats what is cache about for me).
So the question is - Am I able to - from level of theme - take control of WordPress initialization before theme functions.php? - the best would be as soon as possible after request start
Why? Getting html from cache takes 0,05s in my case, and time from request start to functions.php is 1s so in sume it gives 1,05s that I could reduce to like 0,1s if I'm able to 'capture' request earlier.
I dont want to modify non-theme files like WordPress core files as many people will use this theme, but if there is no other way than maybe but I dont feel it would be good practice?
i guess this might help: http://codex.wordpress.org/Plugin_API/Action_Reference/init
this hook gets executed when wordpress has loaded but before anything is saved
Create a drop-in plugin called advanced-cache.php, put it in wp-content (not wp-content/plugins), put define('WP_CACHE', true); in wp-config.php, and get to work.
Make sure not to cache:
admin pages
404 pages
POSTed pages
pages with query strings
pages that will be redirected
etc
I am creating a Wordpress plugin that if possible, I would like to link to a series of pages to an outside website (an affiliate login), instead of re-building a replica of the same pages inside of the plugin.
My thought was to do this inside of an <iframe>, but since there are several pages, I do not know if this is possible, or if it's even a good idea for other reasons.
I'm thinking it might be better to re-build the pages inside of the plugin. It sounds like there could be a ton of problems trying to do it with an <iframe>.
a single iframe can only point to a single source - so make that source have several iframes instead - make a new html file in your plugins folder
like yourdomain.com/path_to_your_plugin/new_iframe_holding_file.html
in that file put as many iframes as you want show up in your plugin and in your plugin code point the src property of your iframe to that file
What I'd like to do is to have two or more WP databses under the same instalation, each with its own posts, and dynamically switch between them at loading time.
For example, instead of directly plugging WP when a visitor loads the site, first run a PHP script for geo-location and based on this script's result to tell WP which database to load up.
I know about switch_blog but I understand it's a backend technique as it's expensive to run on the front-end.
Thanks
My system is in wordpress -php.
Home page load so many images from third party server(itunes store) . It's take to long time in page load.
Can anybody guide me how to resolve this problem Like we first load all the contents and then after load all images.
At least customers can see the page with content.
Have you installed a Cache plugin on your wordpress like W3 Total Cache?
http://wordpress.org/extend/plugins/w3-total-cache/
If not, you can try to use Ajax to load your images from third party, then your content will be shown directly and your third party images will load without slowing the loading of the content.
Check this : http://api.jquery.com/load/ (Don't forget to use Jquery.noconflict() )
Or you can try this plugin : http://wordpress.org/extend/plugins/advanced-ajax-page-loader/
Honestly when you are depending on third party for piece of content page loading time will be always a issue. I will recommend you to use breeze cache plugin as well as multi regional WordPress Hosting which eventually help your website load basics elements from cache. Secondly closely watch out for rending issue because many WordPress website delay are just because of few lines of code mysteriously typed which can be tested on pingdom or page insight. All the best mate. Cheers