I have a signup form for my free hosting site, how can I get the information from that form to auto create a user on wordpress?
You must have some knowledge about php and html form to do this extensive functionality. As this is a advance level work so i am not going to explain every steps for simple html form. But before starting make sure you have working html form on your remote server, decide how you want to handle errors- via ajax or page redirect and make some security modifications for CSF scripts. You must check that post is coming from your server only. Now submit your from on your site with $_GET['register_from_remote'] value on your server. And paste these codes in functions.php and handle your error or success message as you wish. add_action('init','register_from_remote'); function register_from_remote(){ if ($_GET['register_from_remote']/*or your specific post validateor*/) { if($_POST['user_name'] && $_POST['email_address']){ $user_login = sanitize_user( str_replace(" ","",$_POST['user_name']) ); $user_email = trim($_POST['email_address']); require_once( ABSPATH . WPINC . '/registration-functions.php'); $errors = register_user($user_login, $user_email); if(!is_wp_error($errors)){ echo 'User have been added'; }else { ?> <div class="error flash"> <ul> <?php foreach($errors as $error) { if(count($error) > 0) {foreach($error as $e) echo "<li>".$e[0]."</li>";} } ?> </ul> </div> <?php } }else{ echo 'Sorry either you have not entered user name or email address '; } } } function register_user($user_login,$user_email,$other_info=array()){ $errors = new WP_Error(); $sanitized_user_login = sanitize_user( $user_login ); $user_email = apply_filters( 'user_registration_email', $user_email ); // Check the username if ($sanitized_user_login =='') { $errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username.', 'themeshive' ) ); } elseif (!validate_username($user_login)) { $errors->add('invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.', 'themeshive' ) ); $sanitized_user_login = ''; } elseif ( username_exists( $sanitized_user_login ) ) { $errors->add('username_exists', __( '<strong>ERROR</strong>: This username is already registered, please choose another one.', 'themeshive' ) ); } // Check the e-mail address if ( $user_email == '' ) { $errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please type your e-mail address.', ' themeshive' ) ); } elseif ( ! is_email( $user_email ) ) { $errors->add('invalid_email', __('<strong>ERROR</strong>: The email address isn’t correct.', ' themeshive' ) ); $user_email = ''; } elseif ( email_exists( $user_email ) ) { $errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one.', 'themeshive' ) ); } do_action( 'register_post', $sanitized_user_login, $user_email, $errors ); $errors = apply_filters( 'registration_errors', $errors, $sanitized_user_login, $user_email ); if ($errors->get_error_code()){ //do_dump($errors); return $errors; } $user_pass = wp_generate_password( 12, false); $user_id = wp_create_user( $sanitized_user_login, $user_pass, $user_email ); if (! $user_id) { $errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn’t register you... please contact the <a href="mailto:%s">webmaster</a> !', 'themeshive' ), get_option( ' admin_email' ) ) ); return $errors; } update_user_meta( $user_id, 'credits','0' ); update_user_option( $user_id, 'default_password_nag', true, true ); //Set up the Password change nag. wp_new_user_notification( $user_id, $user_pass ); do_action('themeshive_user_registered', $user_id); return $user_id; } PHP: