Hand Coded Studio Web Development Tips

View our work

mcrypt on PHP 7.2 in Docker

The following lines will install mcrypt on PHP 7.2.

RUN apt-get update -y && \
apt-get install -y libmcrypt-dev && \
pecl install mcrypt-1.0.1 && \
docker-php-ext-enable mcrypt

Read more...

15 February 2019

Import large MySQL database with progress bar

PV can report progress for large MySQL database imports. First, download PV (http://linux.die.net/man/1/pv)

sudo apt-get install pv

To use PV, pass the dump file, then pipe the mysql command specifying the database with -D flag:

Read more...

15 January 2019

Sparkpost on Ubuntu

When you use a Digital Ocean server, you may see errors in the 'mail.log' because your shared IP address is blocked.

The easier solution is to use SparkPost, which can send emails for you.

Read more...

23 August 2018

Debugging WordPress

WordPress will often hide errors, however you can display them by adding these lines to the wp-config.php file:

define( 'WP_DEBUG', true );
define( 'SCRIPT_DEBUG', true );

Read more...

11 May 2018

Clear broken Ubuntu dependencies using Aptitude

I found that the only thing that worked for me was using Aptitude.

Then when it opens it will usually say something about unmet dependencies on the bottom. You can hit the letter g to proceed with the suggested removal. It will take you to a page where it lists what is going to happen.

Read more...

10 May 2018