Tag Info

Hot answers tagged

7

Profiling with Profiler-Plugins Not sure exactly what you need to accomplish with your profiling, but WP Tuner (Wordpress Plugin) goes a long way to finding what is slowing down your WP install. It looks at each plugin and give your the memory, CPU time and SQL queries involved. The SQL Monitor (Wordpress Plugin) analyzes SQL performance. Combine it with ...


7

It's really simply GoDaddy and slow mysql and webservers. I've heard apocryphal stories of people making lots of noise to GoDaddy support and as a result, speeds improve. Do they get moved to better servers or get priority load-balancing? Impossible to say. One other thing to try is http://wordpress.org/extend/plugins/use-google-libraries/ but sometimes it ...


5

By default there isn't any difference for performance of home page. There is however a possibility that some plugin does something slow on that page alone. There are plenty plugins to profile WP performance. I usually use WP Tuner but it seems to be broken for latest WP version, so I have no immediate replacement to suggest. Simplest way is packing ...


5

A lot of this is very subjective and hard to answer because of different server environments, themes, size of database etc. In your experience, when is the time one needs to start thinking about scaling up? If you are concerned with your users experience you should already be practicing sound front end performance techniques. When is it time to scale up? ...


4

There is no blanket solution to this. If developer has a clue - he will reuse bundled jQuery or re-register it to other copy (commonly done to load jQuery from Google's CDN). Otherwise there are a lot of [insane] ways to add jQuery and there is no way to handle them all without global output buffering or tweaking hooks/plugins individually. Overall it is ...


4

method two won't work because no page is loaded yet and $post isn't set when your if check runs. with method one again $post is not yet set at that point, but this method will work if you use WordPress conditionals: function load_slider(){ if( is_page(11746) ){ // Load slider on home page wp_register_script('start-slidorion', ...


4

Yes, Plugins effect site loading time. There are many poorly written Plugins that make unnecessary database queries and load numerous files to the page. The extra JavaScript and CSS files are not that big of deal unless you are using numerous plugins. I have worked on large sites that had 30 or 40 active plugins and the server would crash during any ...


4

I beg to differ with the previous two comments. Using a static home page results in WP using an index scan on the posts table's primary key, vs an (oh so occasional) index scan on post_date, status or post_parent in the posts table. In essence, the home page is dead slow because of the poor database design in WP. The schema has ludicrous multicolumn ...


4

Godaddy is to blame. I think a monkey does everything manually whenever we submit a request for anything. Be it a password change or anything, it will take several minutes before anything happens. Monkey is so busy dealing with everything. Other than that they throttle their FTP connections, limit number of concurrent FTP connections, always have permission ...


4

I prefer not to use GoDaddy because I always encounter performance issues. However, one of my clients is rather insistent on using them... so we are. This is exactly what I do in reverse , I insist that if they want to stay with godaddy they can find another developer/designer.


3

The performance of WordPress does not depend on the number of posts. It depends on the server performance (how fast can PHP scripts be executed). And the performance of the MySQL Server. The server performance is normally no problem if you got enough memory. The bottleneck is in most cases the MySQL server and the connection to it. Sometimes a ...


3

Wordpress should behave the same, only dependent on your server resources. I hope you have a dedicated server because if not then you will experience severe outages and possibly cancellation of your hosting service. Wordpress is merely databases and PHP, so amount of files will not affect its use. It is stable. You could have a billion or trillion or ...


3

Previous versions of WordPress didn't really provide a good means to conditionally enqueue stylesheets and JavaScript within a plugin (i.e. only when needed). So most plugin authors enqueued both on every WordPress init/load, even if the plugin wasn't being used on a given page. Current versions of WordPress allow for enqueuing later in the flow so you you ...


3

We have built a PHP profiler on top of XHProf that also uses callgrind output format. The main advantage over XDebug is hugely lower overhead and better recursive function handling, as well as XHProf-style profiling begin and end functions, enabling automated unit testing. You can see it at http://www.exteon.ro/en/products/php-tools/web3tracer You will ...


3

If you are concerned about efficiency, you might want to use the Transients API to store the query. Storing something that you want to randomize might seem counter-intuitive, but if you store the entire query, you can always randomize and manipulate the resulting array to get the results you want. Here's how to get all the subscribers and store them in a ...


2

I will try to answer this as best as possible given that there is no bulletproof method. It's up to the developer to really plan out how the DOM is painted, WordPress cannot guess as to what a theme/plugin/user is going to be doing, it can simply provide some guidance and basic tools. The problem of course is when many plugins are added to a site, you can ...


2

You can try this plugin: http://wordpress.org/extend/plugins/wp-minify/ it allows you to consolidate and minify your JS and CSS


2

You don't want to fetch all users if you only need 5. If you want to use WP_User_Query() to fetch 5 users by random, you can try to use the pre_user_query hook to overwrite the orderby part: $args = array( 'role' => 'subscriber', 'number' => 5, ); add_action( 'pre_user_query', 'my_pre_user_query' ); $wp_user_query = new WP_User_Query( ...


2

Removing the hierarchical parameter from the register_post_type function call did the trick, as per vancoder's suggestion. On the back end, looking at what the hierarchical option does (set the new post type to behave like the page post type) tells me that it probably shouldn't have been set in the first place.


2

No the depth of your directory structure has almost no impact to load time. Maybe if your structure is very depth and the URLs for the images are very long you can hit the maximum length or your markup blows up. But a flat hierarchy should not be a problem as long as you keep the file names short enough. Then again, if your store everything in one ...


2

You've got Ā»Conditional TagsĀ« in WordPress. Those allow you do determine if some condition meets or not (basically those are parts of the $wp_query object, just wrapped with a public API function). In detail: There's is_page(), which tells you if you're on the desired page not. So just wrap it into a function, hook in at the right hook and abort if you're ...


2

First a bit of advise (since the solution is based on it) - always "enqueue" your scripts, don't just add them in the footer. Read this, for example . Now the solution for loading scripts on specific template, since this is what you asked for: function enqueue_themescrits() { if ( is_page_template('contact.php') ) { //the file your contact page uses ...


2

It looks like that wordpress can't check for updates on the one server but can on the other. Wordpress does not output much information if it can't, it's just an request which takes it's time to time-out. Install the Disable WordPress Core Update (Wordpress Plugin) and the Disable WordPress Plugin Updates (Wordpress Plugin) to disable those update checks ...


2

I would do most of my troubleshooting in the Debug Bar plugin along with the Debug Bar extender plugin. This plugin gives you detailed access to everything that is going on behind the scenes. It can also detail memory usage and execution time for each function and database query along with where it was called from. I would start by doing some checking ...


2

It looks like your site is doing a lot of processing when displaying a page. have you tried adding a caching mechanism? you can give plugin a try: http://wordpress.org/extend/plugins/w3-total-cache/


2

Profiling with Xdebug I searched for some links so it's easier to read into the topic. I've looked for doing PHP profiling with XDebug, something I would suggest to do: Xdebug: Documentation: Profiling PHP Scripts (Xdebug Documentation) Xdebug Quickstart: Profiling in PHP (by Bill Hewitt; 4th May 2010) Profiling PHP Applications With xdebug (by Stefan ...


1

You could always concatenate them all into a new plugin and activate that instead, but you're honestly wasting your time. The maintainability from keeping them separate dwarves the performance benefit... That said, be aware that using tons of plugins does affect your site's performance... You can easily measure that using benchmarking tools such as siege ...


1

At first, check the quereis of WOrdPress and the included images, scripts and stylesheets. You can check the queries with the plugin Debug Queries and you become more information about your install and mistakes with the plugin Debug Objects.


1

Debug Queries plugin can also help in this task. If you want to be even more specific, and don't mind dealing with some code, you can use Plugin Test Drive (separates the tested plugins) and add the following function just before and after each plugin file is called: <?php function getTime() { $a = explode (' ',microtime()); ...


1

Avoid using godaddy, I had the same problem with them. You are referring to TTFB, (Time to first Byte). Regular TTFB range from 0.3 to 1.5 sec max. in a good server configuration. It doesn't matter if you use CDN, Minimize your java/css. Although your website after the TTFB load fine, If the server is not well configured/optimized it will take too much ...



Only top voted, non community-wiki answers of a minimum length are eligible