To create a WordPress user with membership signup can be achieved with the below workflow -
Create a profile with fields that you wish to collect during your membership signup process (Primary email address is mandetory) -
In the advanced settings section of your profile you have an option called "WordPress user account registration option?"
CiviCRM help text for this option -
If you are using this profile as a contact signup form, using it in an online contribution page OR an event registration page, anonymous users will be given the option to create a WordPress User Account as part of completing the form. In addition, you must include a Primary Email Address field in the profile.
Once you have created a profile you need to create a CiviCRM contribution page that offers membership and attach the new profile that you created.
For WordPress you will also need to check the box "Anyone can register" in the WordPress general settings.
The contribution page will now offer the account creation option when a user is not logged in -