Restore Website

Please figure out which database belongs to your website

3 Likes

How can I see which one? Can I see it as preview somewhere?

I find out the database of sashamaltese.com, and imported to php. Now I should upload again to htdocs all the files of domain sashamaltese. What about other files.
Capture

You have 10 different database backups in there. It’s up to you to figure out which database corresponds to which website.

A good place to start is to check the wp-config.php in the files backup of the website you’re looking to restore. The very first setting in it is the DB_NAME parameter, which as the name suggests, contains the name of the database the site was using. You can usually find a database export with the same name.

Just upload the files of your website to the htdocs folder of the domain you’re restoring it to. Everything else is basically junk files created by the hosting service, just ignore those.

4 Likes

I just did it, but still no wordpress website is shown up. I import the database of sashamaltese by finding the name on php. Also uploaded all files of domain sashamaltese to htdocs. What else?

For starters, let me make one thing very clear:

STOP USING SOFTACULOUS! YOU WANT TO RESTORE A SITE, NOT CREATE A NEW ONE!

You need to migrate your website as instructed in this article: How to migrate your website to InfinityFree

In short:

  1. Clear out the htdocs directory of your domain.
  2. Upload the entire WordPress installation from your backup to your account.
  3. Create a new MySQL database to be used for your site.
  4. Import the database backup into the MySQL database.
  5. Update the settings in the wp-config.php of your site (which you uploaded through the backup) to use the database credentials of the database you just set up.

Please, please, please, please just follow our instructions. Please stop coming up with your own way to do it, failing, and then asking us to help when it breaks. I’ve personally probably migrated hundreds of WordPress sites, so please trust me when I say that you’re making things unnecessarily difficult for yourself right now.

4 Likes

Okay I understood I will stop using Softaculous. But I want a video tutorial or something like guide by images to do as you say practically. Because I can’t understand or find any of those if they aren’t explained by images or video. Do you understand me?

Another thing to explain, I got backups from Hostinger as folder shown to images above (WinRAR). I do not have access anymore it expired the hosting I had with them. Even though it will be still active the backups are more than 500MB allowed to use All in One- WP-migration plugin to the old WordPress website.

Leaving aside the fact that using migration plugins is not recommended by either WordPress or by us, and in our experience tend to break most of the time due to hosting limits: you have a full home directory backup and database backups, which no migration plugin will be able to make sense of.

You don’t need to. You have the files and you have the database. So you can skip the export steps, because you already have those contents. You can move on to uploading the files and setting up the database.

3 Likes

I uploaded all the files of my domain sashamaltese.com to htdocs. The other files you said are junk so I left them. I also imported the database of sashamaltese to php admin. Now what are the other steps, I should go to Softaculous and uninstall WordPress? Please explain me, by video or images all the steps I should follow and finally get my website back again. Also will do the same with the other website.

No, that’s what you should have done before uploading the new files. That’s step 1 in the list I gave you. I don’t know what you uploaded and where, but I see a fresh WordPress installation on your site, which can’t happen if you’re migrating in an existing site.

The migration guide doesn’t list this step, because it assumes you’re starting with a clean account.

Please perform these steps, in this order:

To be clear: first delete all files, databases and installations on your account. Then, using a completely empty htdocs folder and a new and empty database, import your existing site. There is no way to see a fresh WordPress installation if there is no fresh installation on your account.

Also, if you see a WordPress installation wizard page at any point: STOP IMMEDIATELY. It means your config is missing or incorrect. The setup wizard will create new config and a fresh database, which is not what you want. So if you see an installation screen, check your configuration. But whatever you do, don’t go through the installation steps.

Always remember that you’re trying to migrate an existing site, not setup a new one.

4 Likes

Now I have done all the tasks you told me:

  1. Clearing out the htdocs directory of my domain
  2. Uploading the entire wordpress installation from my backup to my account (public-html)
  3. Creating a new MySQL database to be used for my site
  4. Importing the database backup into the MySQL database.

the final step 5. How can I update the settings in the wp-config and what to put on that?

Also what should I do to enter to wordpress because I have not installed Softaculous to have access on wordpress.

I see, good. You’re almost there regarding this part: the database and files are present, but the files are currently placed in a directory called public_html. Our hosting uses the directory htdocs for website files, so you’ll need to rename the public_html folder to htdocs for your site to work.

Open the file manager of your account, navigate to your website’s directory, find the file called wp-config.php, right click and choose Edit.

Within that file are the parameters DB_NAME, DB_USER, DB_PASSWORDandDB_HOST`. You’ll need to change all of those.

In the client area, you can find the menu MySQL Databases. In the table, you can find the name of the database, which you’ll need to set as the DB_NAME parameter in the wp-config.php file. At the top of the page you’ll also see the MySQL username, MySQL password and MySQL hostname. You’ll need to enter those in the DB_USER, DB_PASSWORD and DB_HOST parameters in the wp-config.php respectively.

Then just save the file and try to access your website! Assuming the files and database were uploaded correctly, you should see your site exactly as it was on Hostinger!

When this is all done, you’ll have migrated the entire site exactly as it was from Hostinger. So you can login with the same WordPress admin username and password as you did with your site on Hostinger.

If you always entered your site through Hostinger’s script installer, you’ll need to recover the admin username and password. I usually do this through phpMyAdmin. WordPress has an article on this, which you can find here: Reset Your Password – Documentation – WordPress.org

3 Likes

I have done all the steps, renamed public_html to htdocs, and add all the DB_NAME , DB_USER , DB_PASSWORDand DB_HOST from MySQL.

Then I reset my password as described to that article through phpMyadmin. After all of these steps, I wanted to log in to wordpress by searching sashamaltese.com/wp-admin/ and it shows that image which uploaded here. Thnx

Hmm, it seems that there may be more things you need to change. If you see a “critical error” message, the first thing to do is enable WP_DEBUG in your site to see the actual error message: Debugging in WordPress – Documentation

I enabled this on your site to get some actual error messages, which I did.

The first message was the following:

Warning: file_exists(): open_basedir restriction in effect. File(/home/u507253835/domains/sashamaltese.com/public_html/wp-content/plugins/tenweb-speed-optimizer//includes/WebPageCache/OptimizerWebPageCache.php) is not within the allowed path(s): (/php_sessions:/tmp:…:/var/www/errors:/usr/share/pear:/home/vol1000_8/infinityfree.com/if0_35170644/htdocs) in /home/vol1000_8/infinityfree.com/if0_35170644/htdocs/wp-content/advanced-cache.php on line 12

While looking at the wp-config.php, I noticed there is a setting TWO_PLUGIN_DIR_CACHE that points to a full directory path on Hostinger’s server. Since we don’t use the same file structure and don’t give you the same username, this doesn’t work here.

You can update this variable and replace the Hostinger path with the path on your InfinityFree account, but you can also just replace the Hostinger path with a relative path so you never have to change this again, like so:

define( 'TWO_PLUGIN_DIR_CACHE', __DIR__.'/wp-content/plugins/tenweb-speed-optimizer/' );

The second error is this:

Warning: require_once(/home/vol1000_8/infinityfree.com/if0_35170644/htdocs/wp-content/plugins/royal-elementor-addons/freemius/includes/class-freemius.php): Failed to open stream: No such file or directory in /home/vol1000_8/infinityfree.com/if0_35170644/htdocs/wp-content/plugins/royal-elementor-addons/freemius/require.php on line 56

This error says the file wp-content/plugins/royal-elementor-addons/freemius/includes/class-freemius.php is missing. Something may have gone wrong while uploading it from the backup, so please find the file in the backup and re-upload it.

Please check whether the file was uploaded successfully after the upload has finished. If it isn’t, it’s possible that our server deleted it. If the file is over 1 MB in size, it’s automatically deleted. If that is the case, then I’m afraid you won’t be able to use this extension here.

4 Likes

Please can you tell me in short and simple way what should I do? Should I contact hostinger again?

To solve the first error, go to your wp-config.php file, find the line that begins with define( 'TWO_PLUGIN_DIR_CACHE' and replace it with this:

As for the second error, check if your backup’s royal-elementor-addons/freemius/includes folder has the file class-freemius.php, and try reuploading it. If the upload does not succeed, however, you might need to remove the Royal Elementor Addons plugin, or at least the Freemius portion of it.

4 Likes

For the first one, I replaced and for the second one the upload was unsuccessful and I remove only Freemius portion of it.

What’s next?

The website itself was migrated here on 2023-09-30, I the next available backup is the one we have to provide you from 2023-10-07 at 22:44:18

as for the migration issue on your side, I would assure you that there’s not data loss or left behind from our side and it would need to be reconfigure from the current host where the website are hosted.

This is the message from Hostinger about back ups, that assured me that everything it is on the folder they gave me.

All I can tell you for certain is that your WordPress site is trying to include a file that doesn’t exist.

Which is why I told you:

I don’t know what’s in the backup you got from Hostinger or where in the process this file went missing. I even suggested after this paragraph that it might be something on our end.

But instead of trying to figure out who to blame, let’s focus on getting your site up and running. And to do that, you’ll need to restore this missing file.

5 Likes