Categories
Uncategorized

Resetting WordPress Admin User via HeidiSQL

Download and install HeidiSQL (should also work with any of your favorite MySQL clients)

Connect to your database and use these queries in the query panel

select * from wp_users
UPDATE wp_users SET user_pass=MD5('123456') WHERE user_login='me';

Don't have an admin user account do this instead to create a new one:

INSERT INTO `wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`, `display_name`) VALUES ('1000', 'adminusername', MD5('YourSecurePassword'), 'adminusername', 'youremail@email.com', '0', 'Your Name');

INSERT INTO wp_users (ID, user_login, user_pass, user_nicename, user_email, user_status, display_name) VALUES ('1000', 'omgadmin', MD5('Indiana99%'), 'tempuser', 'alan.son@omnicommediagroup.com', '0', 'OMG Admin');

INSERT INTO databasename.wp_usermeta (umeta_id, user_id, meta_key, meta_value) VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');

INSERT INTO databasename.wp_usermeta (umeta_id, user_id, meta_key, meta_value) VALUES (NULL, '4', 'wp_user_level', '10');

Categories
Uncategorized

What FREE alternatives are there to Microsoft Office?

<divclass="fb-video"data-href="https%3A%2F%2Fwww.facebook.com%2F158941520834377%2Fvideos%2F574337226502506%2F&show_text=0&amp"data-allowfullscreen="true"data-width="500"></div>

Categories
Uncategorized

How can I undo the last Git commit?

So you have made a mistake like eating last nights left of curry and now you are regretting it, unfortunately you can't take that one back but thankfully with Git you can get back to a state of sanity, ready? Here we go!

Undo Your Last Commit

$ git reset --soft HEAD~1

git reset will rewind the current HEAD branch to the specified revision.

Categories
Uncategorized

Ansible Vault – DevSecOps

Categories
Uncategorized

Export WordPress MySQL Database using WP CLI wp db export command

Categories
Uncategorized

Installing WP-CLI

Shortcut to install: copy the line below and paste it into your terminal and you should be ready to go.

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && chmod +x wp-cli.phar && sudo mv wp-cli.phar /usr/local/bin/wp

See more videos on WP-CLI

How to Export WordPress Database with WP-CLI

Categories
Uncategorized

How to Export MySql Database with PhpMyAdmin

  • Open PhpMyAdmin control panel (you may need to login with a username and password)
  • Select the database that you want to export
  • Click on Export
  • Choose Quick or Custom then press the Go Button to download the file to your computer

Feel free to leave a comment or question

Categories
Uncategorized

WordPress plugin database export

  • Go to the Add Plugin menu and Search for Database backup
  • Choose a plugin of your choice, in this video I am using UpdraftPlus
  • Install and Activate the Plugin
  • Open the plugin settings
  • Backup the database only
  • Download the file to your computer
  • Check the file
Categories
Uncategorized

How to Backup MySQL Database

There are many ways to backup a MySql database such as:

From all of these methods my personal favorite method is to use WP-CLI, however this method may not be available to you if you are using a shared hosting provider and you need to be comfortable with some command line, in this case the most common method is to use PhpMyAdmin or use a WordPress plugin.

Categories
Uncategorized

Migrating your Worpress MySQL Database to AWS Aurora

Amazon Aurora is an enterprise-class, fully managed database service available at 1/10th the cost of commercial databases. In this tutorial I am going to show you how to migrate your existing MySql WordPress database to Aurora.

Benefits include:

High performance and scalability: Get 5x the throughput of MySQL, 3x the throughput of PostgreSQL, 64TB of auto-scaled storage, and 15 read replicas.

High availability and durability: Automatically maintain 6 copies of your data across 3 AWS availability zones, which means you can sleep at night.

These are the steps we are going to take: