What is the best way to setup wordpress development environment for freelancers with version control?

Have you looked at VVV ? Varying Vagrant Vagrants is designed to support WordPress plugin and theme development using vagrant boxes and github version control. https://github.com/Varying-Vagrant-Vagrants/VVV Re Github/Bitbucket – you may possibly use one master and then have a branch per subdomain if there is enough commonality, but from the very vague information you have … Read more

WP_Query on different site in a multisite setup

Alternative option could be using the Rest API: Example (post): Search for Jane Doe in posts: https://example.com/staffsite/wp-json/wp/v2/posts/?search=jane+doe Example (custom post types): If the public and searchable custom post type (e.g. staff) has show_in_rest set to true then we can search for Jane Doe in staff posts: https://example.com/staffsite/wp-json/wp/v2/staff/?search=jane+doe ps: Somewhat related, if you want to create … Read more

SQL Query to Get list of all users along with their blogs

You can use get_blogs_of_user() to get all the blogs of a given user. So to get a list sorted by the users: global $wpdb; $blogs = array(); $user_ids = $wpdb->get_col( ‘SELECT ID FROM $wpdb->users’ ); foreach( $user_ids as $user_id ) { $blogs[$user_id] = get_blogs_of_user( $user_id ); } // you can use var_dump( $blogs ); to … Read more

setup Multi Multi-site with one installation?

I’ve ended up with using such solution: 1) Created folders like: wp-base – wp-admin – wp-includes – …. all wp-php files and I’ve created “symlink” that 2-folder and wp standard php files inside other folders: my-wp-1 – wp-content & wp.config.php & htaccess my-wp-2 – wp-content & wp.config.php & htaccess The only thing I had to … Read more