How to Create Customer programmatically in Magento?

In this post I just want to describe how we can create new customer programmatically in Magento, Even though anyone can create new customer via admin interface or through a signup form on the website, but in some cases if you have numbers of the customer then this will take alot of time to create the customer so this will be the time consuming task, to avoid this situation, I have created a script by using it you can easily create the customer in Magento in very less time.

Suppose you want to create the new customer via using the Code in Magento, its very easy and you can create the customer from the steps given below:

$siteId = Mage::app()->getWebsite()->getId();
$store = Mage::app()->getStore();
$customer_data = Mage::getModel("customer/customer");
$customer_data   ->setWebsiteId($siteId)
catch (Exception $e) {

By using the above code you can successfully create the user and if you want to assign the address to this customer just follow the step given below:

$address_data = Mage::getModel("customer/address");
$address_data 	->setCustomerId($customer_data->getId())
				//->setRegionId('1') //state/province, only needed country is USA
catch (Exception $e) {

Now the customer with the address, so now this customer is ready for the order.

Stay tuned for the Magento and Magento2 latest tutorial and updates, Hope you enjoyed reading, if you need the professional Magento Development we can help you, just Click on the Link and send me your requirements.