How to change WordPress password if you forget it.

How to change WordPress password if you forget it?

Imagine that you forgot password yo your WordPress site and cannot login.
But still if you have access to cPanel of your hosting, then you can set new password.
To do this, login to cPanel and open PHP My Admin.

After that select database that belongs to your WordPress site.
If you have multiple WordPress sites in your hosting and you don’t know which one belongs to desired site.
In this case you can login to site by FTP and check content of file wp-config.php.
It should have string that defines database name, for example like this:

/** The name of the database for WordPress */
define( ‘DB_NAME’, ‘google_a2wp533’ );

Okey, when you opened desired database, you need to find table wp_users or wpy5_users in my case:

After that find row with corresponding user name and press link edit on this row.
You will see page with columns:

In this page enter new value for password in user_pass column, select MD5 as function and click “Save” link.
Now you can try to login to your WordPress site.

Good luck and don’t forget your password again:)


How to bypass windows max path length in 260 characters?

In windows maximal length of path is defined by MAX_PATH, which is y default has value 260.
But from another side many win32 api can operate with path length up to 32,767 characters.
Starting from Win 10, Windows api does not depend on MAX_PATH value.
To enable it user should change registry.
The registry key Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled (Type: REG_DWORD) must exist and be set to 1.
To enable it using Powershell, please run Powershell as Administrator and run following command:
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force