How to Back Up WordPress Manually, Without Plugins

backup cloud

backup cloudWhile there are many backup solutions both paid and free some of you will want to know how to backup WordPress site or blog manually without relying on plugins or paid services. It is a matter of preference really, but if you are a control freak like me or if you have too much to lose in case of disaster, knowing how to do this will definitely not hurt.

What you have to know about your WordPress site is that ir consists of:

  • database that can be accessed via PHPMyAdmin in your cPanel. Database contains all your pages, text, titles, plugin settings, menus, ads etc.
  • WordPress files with wp-content folder being the most important. This can be accessed via File Manager in your cPanel. wp-content folder is important because it contains all your images, themes, plugins. Obviously images here is what we are most concerned about.

What it means is you can afford to lose all the rest, because it can be easily restored with fresh WordPress install. Even your themes and plugins aren’t typically something to worry about because you can easily download and install them again, but your text and images are crucial.

So basically, if you back up just these two you are fine. The disasters in form of being hacked or database failure never stroke me yet but I had to use my backup quite a few times because I like to switch my hosts and when I do so I prefer to transfer my files myself (remember, I am a control freak).

The good news is that manual backup is very easy to do. Some of you might find using FileZilla a little challenging for wp-content backup, but even your great grandma and elementary school kids can download database backup, provided your host gives you a cPanel.

Most hosts will provide you a cPanel. I used Hostgator, Site5, StableHost, Siteground, ASmallOrange, Bluehost… it all works there. Bluehost and Site5 looked just a little different but the principle is the same and it’s very easy to figure out how to do it there.

So let’s just do it!

Step 1.
First get rid of anything you have in your dashboard that you don’t use. Now you don’t have to do this but it’s a good habit to keep things lean and light. If you keep twenty twelve, twenty thirteen, twenty fourteen themes when you use Genesis or any other theme it is a waste. Same goes for plugins. The more themes and plugins you have the longer you will have to wait for your wp-content to download. Then most probably you will be uploading it to Dropbox or similar service where after you pass a certain amount of storage, you will have to upgrade to a paid account or a more expensive account. The leaner, the better.

Step 2.
Go to your cPanel by entering in your browser

yourwebsite.com/cpanel

and when you see this

login with your username and password (those of your web host, NOT WordPress).

Scroll down and find Backup Wizard and click to enter:

cPanel backup wizard

Click on backup

backup button

Under Select Partial Backup chose Backup MySQL Databases

mysql database backup

Click on that and you will see the list of databases you have. Most WordPress sites have only one so it will be a no-brainer what to click on. Click on the name of your database to download it to your computer.

As you noticed there were other options to backup email forwarders, filters and home directory but I personally never do this. I barely use my email so I am not worried to lose it. For home directory, if you only have a WordPress install, I find it wasteful to backup everything. As I said earlier you can have a fresh install of WordPress, the only thing that matters there is wp-content folder, so to save my time and space at file storage company (Dropbox in my case) I only backup what is absolutely necessary.

Step 3.
Now you need to open FileZilla. If you don’t have it installed go ahead and download it and install it now from here. FileZilla is a free software that allows you to connect to remote server where your website files are located and to your local computer at the same time. Its convenient interface allows you to navigate both, download, upload, delete and rearrange files as you please. Best of all, it allows you do to do things in bulk so you can hit the button and go have your coffee while it works for you.

I will assume you know nothing about FileZilla and will explain how to configure it first.

So open your FileZilla. Left window represents your local computer, you can navigate your folders right from here. If you created a special folder where you want to save your backup navigate there, or else just choose Desktop or Downloads folder. In my case, I chose Desktop.

filezilla desktop

Now we want to connect to server to be able to see all our website’s files in the right window which is currently empty. We need to connect first so, if it’s not done yet, you need to create a new project by clicking File ==> Site Manager ==> New Site

Give a name to your new site project. It can be anything you want, not necessary site name. As long as you recognize it, anything will do. Then configure access as shown. For most hosts entering mysite.com in Host field will work, provided that your site is already hosted there and name servers propagated. You might meet an occasional host that will not work that way and will use IP address or name server instead. In that case enter IP address provided by your host or name server. If nothing seems to work or if in doubt, contact them and ask what works specifically with their server.

Switch Logon Type to Normal, enter your username and password (same as cPanel) and click Connect. Filezilla will remember these settings, so when you do this next time you will not have to worry about the settings.

Here is the screenshot how it should look like when you are about to click connect.

Filezilla settings

If you entered correct login details and host name your directory listing should be successful. You will also notice that you have some files in the right window. This is what you have on your server. If you were to go to File Manager via cPanel you would see them there, but Filezilla interface is just another way to see them and manage them. Double click on public_html to see your website’s files. When working here be careful not to drag or rearrange files accidentally, because they are all drag-able and rearrange-able.

Once again you will see “Directory listing successful”. In the right window you will see even more files (those that were inside your public_html). Scroll down to find

wp-content

Right click on wp-content and choose download. It will take a while to download so you can just leave your computer alone.

wp-content backup with filezilla

When it will be done you should find downloaded backup wherever you chose to save it (in my case it’s Desktop). You can now zip it and send it to your file storage place together with database (database is already compressed).

You are done!

I never keep very old backups, so when I do new one I delete previous backup so I can stay within free account limit in Dropbox. You can save more than one if you wish, but my point is you don’t have to keep all backups you ever do unless you want them.

More on FileZilla here.

Forgot your WordPress Username or Email? Here is How to Find it!

wordpress database

If you build so many websites that you eventually forget not only your password but even username or maybe even email you used to install WordPress, here is how you can find it (provided you still remember how to access to cPanel where your site is hosted):

1. Go to yourwebsite.com/cpanel and login using your hosting login details.

2. Under “Databases” find “PHPMyAdmin”

3. Find the name of your WordPress database installation in the left column and click on it.

wordpress database

4. Click on wp_users either in the left column or in the center of the page.

wordpress users in database

Next you will see the list of all users, their usernames and their emails, including your own. You now can sign in or reset password using your email address if necessary.

How to Install and Activate Hyper Cache Extended

wplang in wp-config file manager cpanel

To me Hyper Cache Extended is the best cache plugin ever! It makes your site fast and saves you money by allowing you to use shared hosting when you technically should be paying for dedicated server). Although Hyper Cache extended is easy to use, if you are new to WordPress and cPanel you might get confused when this plugin will request to edit wp-config.php file. This is a quick post to explain you how to use it.

After installing and activating Hyper Cache extended, go to cPanel –> File Manager (NOT Legacy File Manager).

file manager

Click on that, choose web root (public_html) and click Go.

choose directory cpanel

Now you will see all WordPress files. You will need to find wp-config.php (NOT wp-config-sample.php)

wp-config in file manager cpanel

Before you do any changes to wp-config back it up by downloading or copying and pasting it to plain text editor. This is VERY important, because any mistake there and you are offline until you figure out what you did wrong. If you have backup, you can simply reupload it immediately and you are back online, although I hope you will not need to do this.

Open wp-config.php (right click + Edit) and find the line that says:

/**
 * For developers: WordPress debugging mode.

Paste the code just BEFORE it:

define("WP_CACHE", true);

like this:

hyper cache

Click Save. Semicolon is MEANT to be there too, so don’t forget it. And please do not copy code from this site, copy it from your dashboard.

Refresh your site and see if it works OK to make sure you didn’t mess it up accidentally.

Please be careful not to add any extra space anywhere in that file or erase something accidentally.

Then go back to your WordPress dashboard and find Hyper Cache Extended plugin settings, review them and see if you want to change anything. For example, you can exclude some pages from caching. I exclude my upcoming sales page so people can see changes I do there immediately. If you don’t have anything like that just save on default and it should be fine. You are done! It will take anywhere from a few minutes to a couple of hours for you to notice changes in speed, because it generates cache page by page.

Some of you may notice that Hyper Cache Extended actually tells you to paste its code before define('WPLANG', '');. The reason why we don’t do that anymore is because the latest version of WordPress doesn’t have that line. If you have an older version with define('WPLANG', '');, then of course go ahead an paste it right after it. Here is how it was supposed to look in older versions of wp-config.php:

So that you understand better what happens, WP is driven by database. Right now every time you load a page php code in your cPanel has to communicate to database and pull data every single time you load page. This makes your site slow and is also bad for resources. If you don’t have much traffic you won’t notice any difference, but for moderately high to higher traffic sites it is difference between paying $10 a month hosting and $120 a month hosting.

What this plugin does is it generates a static version of every page and presents it to visitor every time somebody tries to load your page. That is much faster and better for everyone – you, your host, your visitor and Google rankings. You should also know that this means that because your page is cached, when you make some changes to it, your visitors will not see them immediately. If you keep settings on default, your visitors will see new changes only after about 24 hours. If you make an important change you want everyone to see immediately, you can always go to Hyper Cache Extended settings and clear cache, but don’t do it too often. Only when necessary.

Do not install any other cache plugins when you have this one. You should only have one cache plugin at a time and, in my experience, this is the best one although very few people seem to recognize that. There are other more popular cache plugins but I found problems with each of them.

Again, back up wp-config.php before any changes and be careful when editing.