WordPress has a habit of storing serialized PHP data in the database. This is fine if you’re working in PHP, but when you migrate a website from one domain to
wget -q --spider URL
Just bookmarking for later – always forget.
We’ve started using Timber recently for a few projects and after having had to go back to regular WordPress themes, it’s safe to say I’ll insists on Timber for all future projects.
If you haven’t tried it out yet or are familiar with Twig in Symfony or another library, I guarantee you’ll love it and won’t look back.
Quick bash script for downloading latest WordPress on a server via ssh.
wget http://wordpress.org/latest.tar.gz && tar xfz latest.tar.gz && rm -rf wordpress/wp-content/ && mv wordpress/* ./ && rm -rf wordpress/ && rm -rf latest.tar.gz
Get your SSH public key – with from IP prepended – ready to add to the authorized_keys file of a server you want to log into without a password.
IP=$(curl -Sfs https://wtfismyip.com/text) && KEY=$(cat ~/.ssh/id_rsa.pub) && echo 'from="'$IP'"' $KEY
Go one step further and add it to the server automatically:
IP=$(curl -Sfs https://wtfismyip.com/text) && KEY=$(cat ~/.ssh/id_rsa.pub) && echo 'from="'$IP'"' $KEY | ssh [email protected] 'cat >> ~/.ssh/authorized_keys'