Optimise wp_postmeta table and remove custom fields meta keys
Overtime a wp_postmeta WordPress database table may become bloated and use redundant custom field meta_keys. The table may have thousands of rows worth of dead data such as old custom fields. You can remove these keys quite quickly in the MySQL database once you know the key format, I recently took over a site that previously…
Read MoreAdd WordPress Admin Account to Database wp_users Table
Here is a guide on how you can add in a newWordPress admin account username and password to the database. What you do need to do this have access to the WordPress database by having the database name and password. Also instead of adding an extra admin account you can just change the admin password…
Read MoreHow to Change the MySQL root Password in Linux or macOS via Command Line
If you have forgot the MySQL root password, can’t remember or want to force it….. you can reset the mysql database password from the command line in either Linux or macOS as long as you know the root user password of the computer you are on, this is for MySQL 5.7 onwards: Stop MySQL sudo…
Read MoreImport a mysql database into macOS via Terminal
Import a mysql/mariadb database into macOS via the command line I have found that phpmydmin on the Mac has issues with the max upload file size limit and changing the value in php.ini doesn’t always do the trick. With mysql already installed a quick trip to the terminal will sort this out. Create the database…
Read MoreMySQL ERROR! The server quit without updating PID file
ERROR! The server quit without updating PID file ERROR! MySQL server PID file could not be found! Getting these MySQL errors on your database server on macOS, there seems to be lots of solutions about how to fix this, Google hell, this more than likely happens if mysql is running and the OS is updated…
Read MoreFind 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 MoreUpgrade MySQL Database from 5.5 to 5.6 on macOS 10.8 Mountain Lion
MySQL version 5.6.14 is available for download for OSX, a double click and install is available named Mac OS X ver. 10.7 (x86, 64-bit), DMG Archive. (Don’t worry about the 10.7 naming, Works fine in OSX 10.9 and OSX 10.8) Stop the MySQL Server sudo /usr/local/mysql/support-files/mysql.server stop Download and Launch the DMG There is no upgrade…
Read More