(Xdebug Profiler) Why are there two cachegrind files generated for one page?

When I enable xdebug profiler, open a page in admin, it generates two cachegrind files with almost identical name cachegrind.out.1498219635_761795.crown__minilio_wp-admin_edit_php cachegrind.out.1498219639_141988.crown__minilio_wp-admin_edit_php The output name is defined as xdebug.profiler_output_name = "cachegrind.out.%u.%H_%R" I tried another page, got the same result. Why is that? Which file should I analysis?
Category: Web

Profiling a WordPress Website for Deployment on Shared Hosting?

I am having a problem with CPU usage on my website, and am looking for a way to detect (and fix) what is causing it. A topic not covered in this question. Following on Hakre answer here, I now realize that what I need to do is profile my PHP calling. Is it reasonable to put the website on my own computer, run the profiler, and use that information to improve my website? Any other suggestions on how to do …
Category: Web

How can i add user display name drop down menu in frontend?

How can i add user display name drop down menu in frontend? then user can choose preferred display name? In fact, I used this code answered here: How to edit a user profile on the front end? submit handler: if (!empty($_POST['display_name'])) { update_user_meta($current_user->ID, 'display_name', esc_attr($_POST['display_name'])); } and form: <p class="form-display-name"> <label for="display-name"><?php _e('display-name', 'profile');?></label> <select name="display_name" id="display_name"> <?php $public_display = array(); $public_display['display_nickname'] = $current_user->nickname; $public_display['display_username'] = $current_user->user_login; if ( ! empty( $current_user->first_name ) ) { $public_display['display_firstname'] = $current_user->first_name; } if …
Category: Web

WordPress usermeta scaling for thousands of users

I have developed a CRM plugin for a client integrated with WordPress user management and I stored additional information for each user under the wp_usermeta table. However, the client's customer database is growing exponentially, and we are now in the thousands, which gives us several tens of thousands rows in wp_usermeta: at this point I am starting to be worried about scalability of this architecture. Does anybody have any experience on managing such an amount of users the WordPress way? …
Category: Web

How-to leverage WordPress for creating Extended Social Profiles

My question is actually quite simple, but I think there are a number of answers to choose from: If one were to use WordPress, what would be the most elegant way of creating a part of the website that has "People Profiles", whereby; they can update their own mini-blog, add images, assign them a multitude of taxonomies, etc. (basically having a very light version of Facebook functionality plus some e-commerce products specific to the person). Scalability would obviously be key …
Category: Web

Separate Profiles for Users

I may be using the word - 'Profile' wrong here, but after two hours of googling am left with zero results. So, the query is as follows - We wanted to make a site where we can invite writers to write their post and be able to edit and post easily. We achieved that using combination of plugin and custom code. We went ahead and made a /profile page where the current logged-in user can see his posts, his details …
Category: Web

Using Multiple Queries of "home_url" vs. Calling a Variable Multiple Times

Question Since I am using multiple instances of home_url() in one page template, I was curious if the following method would speed up my page load time. My method is to store the output of home_url() within a variable and then call that variable each time, rather than using home_url() each time. Motivation The reason I thought echoing a variable would be speed up the page load time, is because (if my understanding is correct) echoing a variable wouldn't require …
Category: Web

Send automatic mail to Admin when user/member changes/adds profile

Is there a way to send the updated/added values from profile, when a member/user updates his/hers data, to the admin of the site or another emailadress? Can this be the first step? /* do something when user edits profile */ add_action('personal_options_update', 'notify_admin_on_update'); function notify_admin_on_update(){ // send a mail with the updated values to [email protected] exit; } What is best pracice to send emails from within WordPress?
Category: Web

Readonly input text appears unlocked while the page is loading

I need help with a code for locking editing an input of type text in the profile page of Wordpress. I added the following code: (function(){ $("#email").attr("readonly","readonly"); }); But while the page is loading, the field appears unlocked, and if the user press 'Esc', the page loading is stopped and he can edit the field. Is there any way to avoid this?
Category: Web

P3 Profiler and Yoast SEO plugin

I have profiled my blog with the P3 Plugin and it pointed out that Yoast SEO slows down the site a bit. I then found out that the biggest performance penalty is paid when you "force rewrite" the titles[1], which I am doing. Now I do have quite an aggressive caching turned on with WP Super Cache. Does it still matter if I force-rewrite the titles then? Or in my case it doesn't change a thing since pages are pre-generated …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.