Wait ajax to complete before continue loop

I’ve modified my codes based on Jory Hogeveen comments, and it solved my problem. What I do is, to not using the regular loop but instead use a recursive function that calls itself after it finishes calling for the request. For those who are looking for the same answer, please see below. var users_info = … Read more

Migrating wordpress sites through localhost and ubuntu

Migrating WordPress is not that a big deal. The only tricky part is if the website changes domain, e.g. from https://domain.com to https.//newdomain.com. As general instructions: Pack up the WordPress directory using tar You have to create a package to transfer over to the new location. To do this navigate inside the main wp directory … Read more

get_user_meta() in multiste with respect to subdomain

You could catch and store the data separately on a per blog basis by filtering the user meta update call, via the update_user_metadata filter… function myplugin_init() { add_filter( ‘update_user_metadata’, ‘myplugin_update_points’, 10, 5 ); } function myplugin_update_points( $null, $object_id, $meta_key, $meta_value, $prev_value ) { if ($meta_key == ‘qa_point’) { remove_filter( ‘update_user_metadata’, ‘myplugin_update_points’, 10, 5 ); global … Read more

403 forbidden when changing settings on WP Multisite non-main sites

I had the same problem – I found the rules in Apache modsecurity that include a set of exclusions for WordPress didn’t cover /network/site-settings.php, so I could do everything except edit sites in my multisite setup. In the file /usr/share/modsecurity-crs/rules/REQUEST-903.9002-WORDPRESS-EXCLUSION-RULES.conf I added the following lines: SecRule REQUEST_FILENAME “@endsWith /wp-admin/network/site-settings.php” \ “id:9009999,\ phase:1,\ pass,\ t:none,\ nolog,\ … Read more