If you have forgot the MySQL root password, can’t remember or want to break in….. you can reset the mysql database password from the command line in either Linux or macOS Sierra and OSX as long as you know the root user password of the box you are on, this is for MySQL 5.7 onwards: Stop …
Read More
Migrate WordPress Site from Local Development to Live Server and fix serialized data issues
There are a number of ways to migrate a local development WordPress site from a test to a live server, you can to this manually or via a plugin. Migrating WordPress Manually The manual way to migrate a WordPress site to a live server is in a few steps: Copy the all the contents of …
Read More
Import / Export a mysql database on the command line
To export a mysql database (as a dump) from the command line run: mysqldump database_name > database_exportname.sql To import a mysql database dump into a database: mysql database_name < database_exportname.sql To export all databases into a dump: mysqldump –all-databases > all_databases_export.sql To import one of these mysql databases from the dump into a database: mysql –one-database database_name < all_databases_export.sql
Find out how many database queries per pageload in WordPress
To find out how many WordPress mysql database queries a page requests and how long it takes the page to load whilst querying the database, you can add in a PHP function to a WordPress hook to find out. This can be displayed in either the source code of the html or rendered on the …
Read More