These are steps I needed to perform after moving to a new machine and restoring it from a TimeMachine backup.

Restore Apache and PHP Settings

Restore httpd.conf and php.ini files.

Fix Apache

cd /etc/apache2/
sudo mv httpd.conf httpd.conf-$(date +"%Y%m%d").bak
sudo mv httpd.conf.pre-update httpd.conf
sudo apachectl restart

You should also run the following to see if there are any other errors and fix as needed

sudo apachectl configtest

Fix PHP

cd /private/etc/
sudo mv php.ini-5.2-previous php.ini
sudo apachectl restart

You should also test PHP by running the command below to make sure there are no other issues. Sometimes extensions move and you may need to update their location

php -r 'echo "Hello world";'

Re-install XDebug

  1. Open Xcode and install updates if requested.
  2. Open Terminal and run the following statement to install Xcode Command Line Tools
    xcode-select --install
  3. Finish installing XDebug as per this tutorial.

Re-install mcrypt

Check if crypt is installed using the command below. Mcrypt is used by PHP apps like Magento.

php -r 'echo "mcrypt is " . (!extension_loaded("mcrypt") ? "NOT " : NULL ) . "loaded\n";'

If it’s not, install as per this tutorial.

Fix Local MySQL Databases

Some of my larger local Magento databases became corrupted somehow and some tables which showed that they existed, when you tried to query them threw an error saying they didn’t exist.  I just dumped the whole schema and recreated with fresh live data and everything worked after that.

Depending on the nature of the error you are getting you may need to fix the ownership of your files in the mysql data directory…

sudo chown -R _mysql:admin /usr/local/mysql/data/

…and/or try stopping and starting MySQL.

sudo /usr/local/mysql/support-files/mysql.server stop
sudo /usr/local/mysql/support-files/mysql.server start

Re-Setup VPNs

These were blown away after the restore so I just had to manually re-create them.

Restore Favorites from Transmit FTP App

I had to export my favorites from my old computer’s Transmit app and import them into Transmit on my new Mac.

0 0 votes
Article Rating
in Mac OSX, MySQL
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments