WarpConduit Computing

  • Quick Tips
  • Web Development
  • WordPress Plugins
  • Home
  • Passphrase Generator
  • Password Generator
  • About
  • Contact

How to Reset your Lost or Forgotten WordPress Admin Login Password with wp_set_password

April 17, 2012 by Josh Hartman

Lost PasswordLet me guess…you’ve lost your WordPress admin password, you have no other admins to recover it, and you don’t have access to the admin email account either? Well I hope that you haven’t gotten yourself stuck in that sorry situation, but in case you have go ahead and do this:

Open your site through FTP or cPanel File Manager and add this line just inside the closing ?> of your site’s wp-login.php file (found in the root of your installation):

wp_set_password('foobar',1);

Now, open up a browser go to your WordPress site’s login page (/wp-login.php or /wp-admin) and login using your new password (foobar in this case).

At this point you need to remove the wp_set_password line from wp-login.php and then you’re done. You can now change your password from within the WordPress admin.

The first parameter is the new password you would like to set, and the second parameter is the WordPress user ID. If you need to lookup your user ID connect to your WordPress database using phpMyAdmin or another SQL client and look in the wp_users table.

I’m not sure why the Internet is full of pages suggesting running SQL commands, that hasn’t worked for a while since the passwords are not stored using the MD5 algorithm anymore. Even the WordPress Codex has outdated methods, although it does include the method I have shown you.

Happy log-ins WordPress travelers!

Filed Under: Web Development Tagged With: admin, login, lost, password, reset, wordpress, wp_set_password

PHP 5.4.0 Released

March 2, 2012 by Josh Hartman

PHP 5.4 has finally been released as a stable version. It will no doubt take a while for shared hosting to upgrade, but for those of you under control of your own hosting environment can enjoy it now.

Say hello to traits, a short array syntax, $this for closures, and a built-in web server for testing.

Say goodbye to safe mode, magic quotes, register_globals, and import_request_variables. Wonderful news!

Learn more:

  • New features
  • Backward Incompatible Changes

Filed Under: Annoucements, Web Development

How to Enable PHP 5.3 on HostMonster Shared Web Hosting

January 27, 2012 by Josh Hartman

phpinfo

Click image to view full phpinfo() output PDF

You heard it right, you can now run PHP 5.3 applications on HostMonster. I’ve only testing this on HostMonster, but I would assume the same applies to BlueHost.

Simply add this line to the beginning of your website’s root .htaccess file:

AddHandler application/x-httpd-php53 .php

After making this change you can test it using phpinfo() and it will show you the version at the top, and as of the time of this post Hostmonster is keeping right up to date, running version 5.3.9.

This is exciting news for Zend programmers and other PHP developers ready for the upgrade. Enjoy!

 

Filed Under: Web Development Tagged With: htaccess, php

Fix Redirection and Error Page On Empty WordPress Search

August 2, 2011 by Josh Hartman

I found out just recently that in some cases when you perform a blank search on a WordPress site you are redirected to the front page with an error message. If you encounter this issue simply apply the fix below, which modifies the blank search into a search for one space. This is enough to resolve the error page and land you on the search page.

Add the following code to your theme’s functions.php file to fix this annoying behavior:


if(!is_admin()){
	add_action('init', 'search_query_fix');
	function search_query_fix(){
		if(isset($_GET['s']) && $_GET['s']==''){
			$_GET['s']=' ';
		}
	}
}

Filed Under: Web Development Tagged With: error, redirect, search, wordpress

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • …
  • 9
  • Next Page »

Connect

  • Facebook
  • GitHub
  • RSS
  • Twitter
  • YouTube

Recent Posts

  • How to Permanently Remove the “Learn about this picture” Spotlight Wallpaper Icon From Your Windows Desktop
  • How to Quickly Test a Fax Machine
  • Extremely Useful Applications for Web Development and IT Tasks

Tags

automatic benchmark bigint class composer css embed escape event font function gzip helper htaccess html htmlspecialchars image increment javascript jquery list magento media mysql number observer opencart order output photo php profiling random redirect rijndael software text type ubuntu url windows windows 7 wordpress xampp xss

Blogroll

  • CodeIgniter
  • Fusion Forward
  • jQuery
  • Nettuts+
  • Smashing Magazine

© 2025 WarpConduit Computing. All Rights Reserved.