Category: WordPress

Reset WordPress Admin password through FTP

Edit the “functions.php” file (wp-content -> themes -> name-of-current-theme -> functions.php

And add the following code to the beginning of it – before everything else:

  $user_info = get_userdata(1);  
  echo 'Username: ' . $user_info->user_login . "\n";

Then open your website, and it will show your 1st admin user’s username printed somewhere at the top of your website.

The password for that user account will now be “password”.

Delete the above code from “functions.php”, and login to your admin account, changing your password.

Resetting your password in Joomla

With Joomla, you aren’t that lucky… Joomla is slightly more secure, and quite the bit more annoying. They don’t provide a function to email yourself the password, so you need to edit the database. You can do the following

  1. Login to your MySQL Database using phpMyAdmin
  2. Go to your Joomla Users table, EG: jos_users
  3. Select the record (or table row) for your administrator account (The first admin account, created by default, has an id of 62)
  4. Click on ‘Edit Record’ or ‘Edit Inline’
  5. Select the drop-down “function” of “PASSWORD” on the right
  6. And add 5f4dcc3b5aa765d61d8327deb882cf99 as the new password
  7. Save
  8. Login to your site using the password “password” –
  9. Then change your password when you login

One wordpress install with two domains pointing to it

There are some wp-config codes you can use to allow any domain to run on your website – but this is a method of adding exactly one specific domain name added on to your site. Multiple domains, one WordPress installation.

Open WP-CONFIG.PHP – and paste this after the line about “table prefix”

$hostname = $_SERVER['SERVER_NAME'];
$hostname = str_replace('http://', '', $hostname);
$hostname = str_replace('https://', '', $hostname);
$hostname = str_replace('www.', '', $hostname);
$hostname = strtolower($hostname);
if(substr($hostname, -1) == '/') {
 $hostname = substr($hostname, 0, -1);
if ($hostname == '') {
define('WP_SITEURL', 'https://'.$hostname);
define('WP_HOME', 'https://'.$hostname);

Replace “” with your website address. This should be the 2nd add on domain (for example, if I wanted the website to appear at the address “” also.

How to edit themes, and stop deleting and erasing all changes when upgrading your theme

If you edit and tweak a theme, making the changes in the theme’s folder, all changes will be wiped out if you upgrade the theme.

If you want to keep your changes, and never upgrade your theme, you can make it yours by changing the theme name.
to do this:

  • Set your WordPress site to another theme, like twenty-ten
  • FTP into Root -> wp-content -> themes ->
  • Rename your edited theme to anything
  • Go into the directory and edit ‘style.css’ – adding the theme name
  • Then refresh your WordPress theme selection page and re-add your newly renamed theme

Now you won’t get prompted to update your theme.

About “Envelopery”

I used to use envelopery as an email address and company name (hosting and technology blog) however these have been assimilated into the website as of late.

How did the name “Envelopery” come about?

I was sitting in my sister’s room trying to help her think of a unique username for a new gMail account (but as with many other popular services online, all the usernames you would normally think of were taken) – refusing to just add numbers to the end. I was thinking of different ideas, and one thought that came to me, was that eMail is quite like a post office, then thinking “envelope.. envelopery..?” – I was so amused by the word, thinking it was like a new name for a place where envelopes are made – an Envelopery.