All posts in Databases
Well now here’s an interesting error that mysteriously "just started happening" for no apparent rhyme or reason. We were working on a Cpanel server that we’re very familiar with, and went through the usual process of creating a new mysql database, creating a new mysql user, and then adding that . . . Read more
When dealing with larger databases, it’s often useful to know which tables are actually taking up the space. We can do this with a couple handy SQL commands. *Note: With the commands shown below, you need to substitute your particular values for @DB_NAME and @TABLE_NAME. Or you could set the . . . Read more
I wanted to write some quick notes regarding the feedback that we got from our developers about how to export and import databases using WP-CLI. What a wonderful tool it is! WP-CLI stands for “WordPress Command Line Interface”. There are a bunch of commands you can use to manage WordPress . . . Read more
Rsync is an amazing tool for direct server-to-server data transfers. Very speedy, and very smart! You can use rsync to do synchronizations between source and destination, comparing them, and copying only what’s changed. What’s especially amazing is that rsync only transfers the “parts” of files that are different. This works . . . Read more
Let’s say you’ve got root privileges, and you’re working along, and you want to quickly backup a database for USERNAME on the PM servers… cd /home/USERNAME/_back mysqldump -uroot DATABASENAME > DATABASENAME_YYYYMMDD_shortDescription.sql (Check the size of the backup file, always a good idea) ls -lah DATABASENAME_YYYYMMDD_shortDescription.sql (Change the owner and group . . . Read more
Running as root, this command will repair all mysql databases on the server. Yes, this will take some time! Note, on PM servers, if you’re logged in as root, then you do not need to specify the password. Other servers may vary. mysqlcheck -Aao –auto-repair -u root where: “A” == . . . Read more
Note: If you’re working in a WHM / Cpanel environment, do NOT do it this way, instead, use the Cpanel tools… (oh, and yea, anything enclosed in “<” and “>” below, are not intended literally, but rather as a placeholder for more reasonable inputs) Login to the mysql command line as . . . Read more
Disk Free, human readable df -h Disk Usage, summary, human readable (I think this include DOES include hidden files / directories) du -sh Disk Usage, per directory, human readable (does NOT include hidden files / directories) du -sh * Disk Usage, per directory, human readable (INCLUDES hidden files & directories) du -sh . . . Read more
*Important: When doing drush system-wide updates (ie: “drush pm-update”), drush will OVERWRITE.htaccess, index.php, and robots.txt. *Make sure you have backups of these files*. A good naming convention to use is: .htaccess_YYYYMMDD_shortDescript.bak Or similarly, index_YYYYMMDD_shortDescript.bak *Also Important: When running drush, you should be logged into ssh with the username for the . . . Read more
Skip to end of metadata Created by Benjamin Turner, last modified on Dec 04, 2013 Go to start of metadata This guide focuses on getting the data out of Pagodabox. General Step-by-step guide for Pagodabox migration: Download the Site from Pagodabox (covered in this guide) Setup Server that will be the . . . Read more
It’s good to know how to create backups for safekeeping. This is how to do that in cPanel. Log into cPanel Please make sure that you are aware of just how much data you are backing up and for what purpose. I.E. check the current size of the data . . . Read more
Creation of a new, blank Wordpess sandbox is useful for wireframing or trying out new themes and/or plugins. Because we are not migrating any content from an existing site, this process is easy, and can be done with GUI tools. Overview of Steps Create a space on the server where . . . Read more
A few tasty tidbits, to jog the memory about database & server optimizations… To be expanded. Share your thoughts and suggestions! Example Server: Memory Available: 1,751,724k total Handy Queries: mysql> SHOW VARIABLES LIKE ‘%cache%’; mysql> SHOW STATUS LIKE ‘Qcache%’; My.cnf Tweaks: ; QUERY CACHE… query_cache_size = 500M query_cache_type = 1 . . . Read more