 <p>With David Fritsch answer I get to do a encrypted password as Joomla does:</p> <pre><code>&lt;?php define( '_JEXEC', 1 ); define('JPATH_BASE', dirname(__FILE__) );//this is when we are in the root define( 'DS', DIRECTORY_SEPARATOR ); require_once( JPATH_BASE .DS.'includes'.DS.'defines.php' ); require_once( JPATH_BASE .DS.'includes'.DS.'framework.php' ); $mainframe =&amp; JFactory::getApplication('site'); $mainframe-&gt;initialise(); jimport('joomla.user.helper'); $password = "test"; echo "&lt;strong&gt;Password: &lt;/strong&gt;" . JUserHelper::hashPassword($password); ?&gt; </code></pre> <p>Note that you have to store the file in joomla root directory, or change JPATH_BASE.</p>