Uploading / Restoring Huge WordPress Sites with All-in One WP Migration

 Migration of WordPress site's are easy, thanks to plugins like All-in One WP Migration however if your site happens to be very large then migrating it can be difficult or next to impossible. 

For starters the plugin All-in One WP Migration limits the upload file size of a backup, but that can be removed by purchasing their Unlimited Extension, I would recommend you do that, but if you still want to be able to upload large backup files check below. 

There are multiple issues with large files that might popup, first there's an upload limit on the server that you have to resolve, this is usually configured on your webhost, through php.ini where you set PHP configuration variables to a high enough number (I am not going to instruct how to do that here, I assume you have already done that.)

If you don't update the server upload limits you won't be able to upload the files. But there's a workaround that I often 

Using WP File Manager to directly upload to your server

Downloading large files, 5gb, 10gb or more, can be a time consuming and in many cases not even practical, say you got a slow connection or a metered one, and even if not that then maybe you just want to speed the process up. 

For that instead of download the file on your computer, then uploading it to the plugin's Import feature, directly upload the backup file in the plugin's upload directory. This is particularly useful as the free version of the extension don't even allow for large files. 

Follow these steps
  1. Install the file manager plugin on your WordPress site where you want to restore your backup
  2. Create a backup on your source site, when the backup is created instead of downloading the file, right click on the download button and copy the link
  3. Go to the file manager page on your target website then navigate to the folder wp-content > ai1wm-backups    (this assumes you have the backup plugin installed on the target site too)
  4. Right click on an empty area and click on "Upload files"
  5.  In the box that opens paste the link to your backup file.
The upload process starts automatically, and it all happens server-to-server, so you never have to download any files then upload it. 

Restoring the Backup file

Now if you go to All-in One WP migration backups page you will see your backup file in the list

The page is at this location

However if you try restoring it, it won't proceed

You are asked to get the paid extension to use the "Restore" functionality. 

Let's by pass that using JavaScript

Good thing about WordPress is that plugin's are supposed to be open-sourced and they cannot provide partial code, even if it has features that you have to pay to use, the plugin still has the entirety of code, so there is always a way to use those feature. 

With a little trick we can use the Restore functionality, which is simply the following JavaScript snippet
var modelimport = new Ai1wm.Import();
var storage = Ai1wm.Util.random(12);
var archive_name = 'REPLACE-WITH-ARCHIVE-NAME';
var options = Ai1wm.Util.form('#ai1wm-backups-form').concat({ name: 'storage', value: storage }).concat({ name: 'archive', value: archive_name});

// Set global params

// Start import
Copy this into a text editor, you will have to make some edits, a very small one. See the line `var archive_name = 'REPLACE-WITH-ARCHIVE-NAME';`  

On the backup page copy the name of the backup file you want to restore and put it in the specified field in that line 

So it becomes
var archive_name = 'example.com-20221215-205102-pit8or.wpress';
Once done, copy the entire snippet of code, on the All in One plugin backup page, open the Chrome DevTools, you can do that by Right clicking an empty area on the page > Inspect Element or CTRL+Shift+J

Go to the Console tab

Paste in the snippet of code and hit enter. As soon as you do that the restore process should start. 

That's basically it, If successful you will get to see the migrated site after the restore process finishes. 

A note to the readers: This workaround relies on the fact that the code of this backup plugin doesn't change to the extent where this snippet stops working, if the above snippets doesn't work for you let us know in the comments what error do you see, but eventually the above snippet might stop working, so do look for new snippets that can do the same thing on Google or request it in the comments and I might update this post if possible. 

And special thanks to this Github gist, I myself ended up on this snippet by giovanni-d to solve the issue, but it did not work, so I tweaked the snippet and it did so sharing the updated one with everyone of you who needs it. 



Disabling Future Dates in WPForms Date Time Field

 WPForms gives us the ability to disable selection of dates in the past however if you want to restrict dates in the future there isn't an option available for the field in the user interface.

That's not impossible to do but you will have to use a bit of jQuery to achieve that. And we will show you how. 

Why I don't upgrade to WordPress

 It's been over a decade of StramaXon, and since I started blogging on things I learn, do and want to share with people. Blogger was the first choice back then, it was free and what else can be a better deal breaker for a young student to start his own website. 

Years have passed, WordPress is now more popular than ever and I in my professional career have built many many WordPress websites and I am totally aware of its pros and how well you can manage everything. 

So why I don't move to WordPress ?

I have given that a thought, I worked on wireframes and designs for a fresh new version of StramaXon on WordPress but dropped it later. 

It's the nostalgia. The nostalgia  I have for Blogger platform is beyond anything. StramaXon is one of the oldest work from the beginning of my work in this field that's still continuing, albeit not as paced as it used to be back in 2012-2015 but I still love to regularly write a few bits every now and then. 

Maybe in the future I change my mind and archive this blog and move to WordPress but for now Blogger is what I am sticking to. Probably will do some minor design updates, make some performance improvements and so on. 

Thanks for reading and subscribe to this blog for blogs on new topics I am working on these days

Conditionally loading JS & CSS Files in WordPress / WooCommerce sites for Better SEO

The score you get on Google PageSpeed Insight tool is a major factor for your website or e-commerce site's search engine ranking, but if you are on WordPress, especially with WooCommerce it is possible your scores are pretty bad. 

Getting OAuth Authentication Right for WooCommerce REST API

Recently I had to work with the WooCommerce REST API to do stuffs with products, mainly create / update it. However with its OAuth 1.0 authentication I couldn't get it just right. The REST API returned authentication error messages. 

Unable to Import Products CSV in WoocCommerce - 500 Internal Server Error

 Setting up a store but now you are stuck with the CSV import of your products? It happens and its frustrating when the error is not very descriptive. 

I faced a similar issue and after a lot of digging found a solution for the issue I was facing. 

Page List widget configuration not working on Save - javascript:void on click

 If you are trying to add / edit the "Pages" widget on your Blogger blog's layout you may have noticed that it isn't working lately. 

Show random product suggestions on Checkout page in Shopify

An "Add more to cart" module on the Checkout is a great way to increase the amount of products your customers buy, Checkout page can be a great place for showing a few more products that your customers may want to add to their carts. 

Fixing WordPress Website Infected by .ico Malware

 More cases of WordPress websites being infected by .ico Malware are showing up and it is a difficult job to get rid of it completely and make sure site safe again, but it's not impossible. 

Getting Rid of WordPress Malware (.ico Backdoor Malware)

Recently major malware campaigns on WordPress were launched, infecting and exposing vulnerabilities in many popular plugins which effectively affected hundreds of thousands of WordPress sites.

In this post we talk about a malware that affects the site by injected malicious .ico files at random locations, as well as index.php files and code snippets in core WordPress files.