While moving WordPress sites from one domain to another for my clients, I often run into file size limitations on phpMyAdmin. Depending on the hosting account I’m moving to, I can sometimes change that limitation with the php.ini file or import from the command line. But, sometimes, I don’t have access to those methods and importing the file becomes nearly impossible.
Last night was one of those times. I had a database export that was over 9MB in size and a phpMyAdmin instance that only allowed a max of 2MB. I had no access to the command line nor to the configuration files for the phpMyAdmin instance.
At first I tried to import the file in chunks, but that just led to more human errors and was going to take way too much time. Some of the database tables alone were more than the 2MB limit.
I finally called the hosting support, hoping they would at least let me upload the file somewhere so they could import from the command line. Nope. They weren’t willing to do that. But, they did make a suggestion that I hadn’t heard of or thought about before.
They said, “Try compressing the file”. I thought import a zip file? Would that work? They said, “Yes”.
I zipped the file. It changed the size to 1MB. And BOOM! It worked!
I learned something new about phpMyAdmin. You CAN import zipped sql files. Awesome! Hope this helps you too when you get that dreaded message, “You probably tried to upload a file that is too large. Please refer to documentation for a workaround for this limit.”