<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>how to change admin password in laravel Archives - Artificial Intelligence</title>
	<atom:link href="https://www.aiuniverse.xyz/tag/how-to-change-admin-password-in-laravel/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.aiuniverse.xyz/tag/how-to-change-admin-password-in-laravel/</link>
	<description>Exploring the universe of Intelligence</description>
	<lastBuildDate>Fri, 06 Feb 2026 03:45:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>How to Change Admin Password in a Laravel Project</title>
		<link>https://www.aiuniverse.xyz/how-to-change-admin-password-in-a-laravel-project/</link>
					<comments>https://www.aiuniverse.xyz/how-to-change-admin-password-in-a-laravel-project/#respond</comments>
		
		<dc:creator><![CDATA[Maruti Kr.]]></dc:creator>
		<pubDate>Fri, 06 Feb 2026 03:45:32 +0000</pubDate>
				<category><![CDATA[laravel]]></category>
		<category><![CDATA[change admin password in laravel]]></category>
		<category><![CDATA[how to change admin password in laravel]]></category>
		<category><![CDATA[laravel admin login password change]]></category>
		<category><![CDATA[laravel admin password change]]></category>
		<category><![CDATA[laravel admin password change xampp]]></category>
		<category><![CDATA[laravel admin password reset]]></category>
		<category><![CDATA[laravel bcrypt password change]]></category>
		<category><![CDATA[laravel change password from database]]></category>
		<category><![CDATA[laravel change password using phpmyadmin]]></category>
		<category><![CDATA[laravel forgot admin password]]></category>
		<category><![CDATA[laravel password change cpanel]]></category>
		<category><![CDATA[laravel password hashing bcrypt]]></category>
		<category><![CDATA[laravel reset admin password without login]]></category>
		<category><![CDATA[laravel tinker change password]]></category>
		<guid isPermaLink="false">https://www.aiuniverse.xyz/?p=21774</guid>

					<description><![CDATA[<p>Laravel is a secure and powerful PHP framework, but many developers face confusion when they need to change the admin password, especially if the password is forgotten or the admin cannot log in. In this blog post, you will learn multiple safe and practical ways to change the admin password in a Laravel project, applicable <a class="read-more-link" href="https://www.aiuniverse.xyz/how-to-change-admin-password-in-a-laravel-project/">Read More</a></p>
<p>The post <a href="https://www.aiuniverse.xyz/how-to-change-admin-password-in-a-laravel-project/">How to Change Admin Password in a Laravel Project</a> appeared first on <a href="https://www.aiuniverse.xyz">Artificial Intelligence</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="683" src="https://www.aiuniverse.xyz/wp-content/uploads/2026/02/ChatGPT-Image-Feb-6-2026-09_14_52-AM-1024x683.png" alt="" class="wp-image-21775" srcset="https://www.aiuniverse.xyz/wp-content/uploads/2026/02/ChatGPT-Image-Feb-6-2026-09_14_52-AM-1024x683.png 1024w, https://www.aiuniverse.xyz/wp-content/uploads/2026/02/ChatGPT-Image-Feb-6-2026-09_14_52-AM-300x200.png 300w, https://www.aiuniverse.xyz/wp-content/uploads/2026/02/ChatGPT-Image-Feb-6-2026-09_14_52-AM-768x512.png 768w, https://www.aiuniverse.xyz/wp-content/uploads/2026/02/ChatGPT-Image-Feb-6-2026-09_14_52-AM.png 1536w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Laravel is a secure and powerful PHP framework, but many developers face confusion when they need to <strong>change the admin password</strong>, especially if the password is forgotten or the admin cannot log in.</p>



<p>In this blog post, you will learn <strong>multiple safe and practical ways to change the admin password in a Laravel project</strong>, applicable to both <strong>XAMPP (local server)</strong> and <strong>cPanel (live server)</strong> environments.</p>



<h2 class="wp-block-heading">Where Is the Admin Password Stored in Laravel?</h2>



<p>Laravel never stores passwords in plain text.<br>By default:</p>



<ul class="wp-block-list">
<li>Passwords are stored as <strong>bcrypt hashes</strong></li>



<li>Common tables used for admin accounts:
<ul class="wp-block-list">
<li><code>users</code></li>



<li><code>admins</code></li>



<li><code>admin_users</code></li>
</ul>
</li>
</ul>



<p>In many projects, the admin user exists in the <code>users</code> table with a column like:</p>



<ul class="wp-block-list">
<li><code>role = admin</code></li>



<li><code>is_admin = 1</code></li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Method 1: Change Admin Password Using phpMyAdmin (Recommended)</h2>



<p>This is the <strong>most reliable and commonly used method</strong>, especially when:</p>



<ul class="wp-block-list">
<li>You forgot the admin password</li>



<li>Admin login is not working</li>



<li>You are working on a live server (cPanel)</li>
</ul>



<h3 class="wp-block-heading">Step 1: Open phpMyAdmin</h3>



<ul class="wp-block-list">
<li><strong>XAMPP</strong>: <code>http://localhost/phpmyadmin</code></li>



<li><strong>cPanel</strong>: Login to cPanel → Open phpMyAdmin</li>
</ul>



<h3 class="wp-block-heading">Step 2: Select Laravel Database</h3>



<ul class="wp-block-list">
<li>Choose your Laravel project database</li>



<li>Open the <code>users</code> or <code>admins</code> table</li>
</ul>



<h3 class="wp-block-heading">Step 3: Locate the Admin Account</h3>



<ul class="wp-block-list">
<li>Find the admin record using <strong>email</strong>, <strong>username</strong>, or <strong>role</strong></li>
</ul>



<h3 class="wp-block-heading">Step 4: Generate a New Password Hash</h3>



<p>Open terminal or command prompt in your Laravel project directory:</p>



<pre class="wp-block-code"><code>php artisan tinker
</code></pre>



<p>Then run:</p>



<pre class="wp-block-code"><code>bcrypt('NewPassword@123')
</code></pre>



<p>This will generate an encrypted string starting with <code>$2y$...</code>.<br>Copy this hashed value.</p>



<h3 class="wp-block-heading">Step 5: Update Password in Database</h3>



<ul class="wp-block-list">
<li>Click <strong>Edit</strong> on the admin record</li>



<li>Paste the hashed value into the <code>password</code> column</li>



<li>Save changes</li>
</ul>



<p>✅ The new admin password is now: <strong>NewPassword@123</strong></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Method 2: Change Admin Password Using Laravel Tinker</h2>



<p>This method is useful when:</p>



<ul class="wp-block-list">
<li>You have project access</li>



<li>You prefer not to manually edit the database</li>
</ul>



<h3 class="wp-block-heading">Open Tinker</h3>



<pre class="wp-block-code"><code>php artisan tinker
</code></pre>



<h3 class="wp-block-heading">If Admin Is in the <code>users</code> Table</h3>



<pre class="wp-block-code"><code>use App\Models\User;

$user = User::where('email', 'admin@example.com')-&gt;first();
$user-&gt;password = bcrypt('NewPassword@123');
$user-&gt;save();
</code></pre>



<h3 class="wp-block-heading">If Admin Uses a Separate Model</h3>



<pre class="wp-block-code"><code>use App\Models\Admin;

$admin = Admin::where('email', 'admin@example.com')-&gt;first();
$admin-&gt;password = bcrypt('NewPassword@123');
$admin-&gt;save();
</code></pre>



<p>✅ Password updated successfully.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Method 3: Reset Admin Password Using a Temporary Route</h2>



<p>This method should be used <strong>only in emergencies</strong>.</p>



<h3 class="wp-block-heading">Step 1: Add Temporary Route</h3>



<p>Edit <code>routes/web.php</code>:</p>



<pre class="wp-block-code"><code>use App\Models\User;
use Illuminate\Support\Facades\Hash;

Route::get('/reset-admin-password', function () {
    $user = User::where('email', 'admin@example.com')-&gt;first();
    $user-&gt;password = Hash::make('NewPassword@123');
    $user-&gt;save();
    return 'Admin password changed successfully';
});
</code></pre>



<h3 class="wp-block-heading">Step 2: Open the URL Once</h3>



<pre class="wp-block-code"><code>yourdomain.com/reset-admin-password
</code></pre>



<h3 class="wp-block-heading">Step 3: Remove the Route Immediately</h3>



<p>⚠️ This step is critical for security reasons.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Common Mistakes to Avoid</h2>



<ul class="wp-block-list">
<li>Saving passwords in plain text</li>



<li>Using <code>md5()</code> or <code>sha1()</code> for hashing</li>



<li>Forgetting to delete reset routes</li>



<li>Trying to change passwords from the <code>.env</code> file</li>
</ul>



<p>Laravel passwords must always be stored using <strong>bcrypt or Hash::make()</strong>.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Which Method Should You Use?</h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>Situation</th><th>Best Method</th></tr></thead><tbody><tr><td>Forgot admin password</td><td>phpMyAdmin</td></tr><tr><td>Local development</td><td>Laravel Tinker</td></tr><tr><td>Live server (cPanel)</td><td>phpMyAdmin</td></tr><tr><td>Emergency one-time reset</td><td>Temporary route</td></tr></tbody></table></figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Changing the admin password in a Laravel project is simple if you follow the correct and secure approach.<br>For beginners and production servers, <strong>phpMyAdmin with bcrypt hashing</strong> is the safest method.</p>



<p>Always follow Laravel security best practices to keep your application protected.</p>
<p>The post <a href="https://www.aiuniverse.xyz/how-to-change-admin-password-in-a-laravel-project/">How to Change Admin Password in a Laravel Project</a> appeared first on <a href="https://www.aiuniverse.xyz">Artificial Intelligence</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.aiuniverse.xyz/how-to-change-admin-password-in-a-laravel-project/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
