Warning: Undefined array key 30718 in /home/clients/99345b07297c4e568d9816abd4a8d8fe/giovannimalagninodoteu/wp-content/plugins/jetpack/modules/carousel/jetpack-carousel.php on line 832
WordPress update without making a mistake
So here is your website online. Suddenly, a message in your dashboard asks you to make a WordPress update. Ouch, you’ve never done that, and it scares you! Worse still, WordPress, since version 3.7, makes its updates all alone! What if the site you spent so many hours on was not working after the update? Worrying isn’t it? Don’t panic, I will give you the steps to take to ensure that all this work is not permanently lost in case of a problem. And I’ll explain how to disable automatic WordPress updates.
How to disable automatic update
Sometimes you will want to disable the automatic WordPress update completely. If you have modified the source files for example, you will want to be sure that your hard work is not destroyed. In this case you have two options: edit the wp-config.php file, or use a plugin. My advice? For such a small modification, I choose the wp-config.php edition. Are you really uncomfortable touching this document? No problem, here is a plugin that will do the work for you: easy updates manager.
Easy updates manager
This plugin will allow you to completely customize the management of updates to your site. Not only WordPress code, but also plugins, themes and translations. You can even choose one by one the extensions and themes you want to update automatically. And of course you can disable automatic updates completely if you want to control the process from a to z.
Obviously, when you touch important WordPress files, you should wear white gloves. We don’t modify these files in a hurry, we think about what we’re doing and above all, we save the document in a safe place before modifying it.
Wp-config contains all the information needed to run WordPress, such as the name of the database used. This file is very important, but it is not a reason to be afraid to modify it, especially in this case. Why do you ask? Simply because this change comes down to…. add a line of code! Not complicated, huh? And here is this line:
define( ‘WP_AUTO_UPDATE_CORE’, false );
So, shall we try? But how do we do that? As mentioned, you have to modify the wp-config.php file, by connecting to your host in ftp, and opening it with your favorite text editor.
Note: it is possible that your WordPress installation already includes this line of code, with the word “true” instead of false, for example when WordPress is automatically installed by your host. In this case, the word true allows automatic update, while false prohibits it.
The WordPress update
There is a crucial step before making a WordPress update: the backup. It is extremely important to make a complete backup of your site. A backup can be done in two different ways: I call them the raw way, and the soft way.
The raw way
Many are adept of it. In my opinion, a completely outdated method. It consists in saving the WordPress folder by FTP, and exporting the database using phpmyadmin. Those who use it trust no one but themselves. However, they should be cautious, as this could play tricks on them. The risks of this method are numerous and you could spend hours repairing your site: broken links, lost database configuration, etc…. Anyway, a nightmare. I have done this in the past, but unless there are special circumstances, I will never do it again. I won’t go through the procedure here, I want to sleep well next night. For dinosaurs, you can see the complete procedure on the official website.
The soft way
Use a plugin! There are many, even free. My favorites are UpdraftPlus and All-in-one WP migration. Both have a free version and a paid version. The simplest is undoubtedly All-in-one WP migration. In the free version, it offers you the backup on the server itself and the possibility to download this backup on your local disk. The paid version also allows you to use a cloud service like Dropbox or GoogleDrive. Note that you can use the free version and that once the file is on your hard disk, nothing prevents you from transferring it to your Dropbox.
UpdraftPlus works more or less the same way. However, its paid version is a very powerful tool. It allows you to save your site automatically before any update, be it of a plugin, a theme or WordPress.
Whatever backup method you use, test your backup file before updating WordPress. For example by restoring it on a blank WordPress installation, locally with MAMP. Or even better, on the same server as your main site using a subdomain. Imagine that your backup file is corrupted and something goes wrong!
I hope you never have to do this step. Again, I will not describe the raw way. Too complicated and outdated.
To restore, simply go to the All-in-one WP migration import menu, or restore in Updraft, and follow the steps. If you were to do a complete restore, I suggest you empty your server completely before, so you’ll leave on a blank basis.
How do these plugins work? Well they create a compressed file that contains all the data of your WordPress site: the complete database, plugins, images, your pages, your articles, everything! Warning: this file can become very large!
Once the backup is done and checked, you just have to click on update and wait patiently. Why not go and drink a good espresso, with a free mind, because you know that no matter what happens, you are sure you have lost nothing? Making a WordPress update shouldn’t be a source of stress or frustration after all! If all goes well, the update itself should take no more than a few minutes.
Finally, once the update is completed, go around your site and check that everything works. Are the images there? Your contact form still works? A quick tour will help you ensure the integrity of your data.
WordPress Update, conclusion
The entire procedure should take you an hour or two, maximum, rarely more. Of course, if you operate an online store with thousands of items, it’s likely to take you longer, but I guarantee it’s worth it. Losing an online business site doesn’t just mean wasting time fixing it up. It also means losing customers, losing revenue and losing a brand image!
You have remarks, questions, suggestions? Let me know about it! Is your procedure different? I want to know it!