Restore Website

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

I’m going to contact Hostinger for this. I don’t know where to find this file missing.

Hi SashaMaltese,

From the information above, this file is from the plugin you used Royal Elementor Addons and Templates.

Simply install the plugin again and your site will be working again.

Cheers!

How to install while @Admin told me not to use Softaculous to have access to wordpress? Also, I can’t access by link sashamaltese.com/wp-admin because it is shown the errors.

Simple, just use ftp

2 Likes

Hmmm… bad news, you will need to minify the code in order to use the plugin

2 Likes

can you tell me how to minify it?

Hi SashaMaltese,

From the error messages, I see you can solve this by renaming the wp-contents/plugins folder as wp-contents/x-plugins. Visit your site once and ignore the errors or shifted layouts. This will temporarily disable all plugins used on your site. Then rename the folder back to wp-contents/plugins, this will not re-enable all plugins but you get to manage them in the admin dashboard.

Once you’re back in the admin dashboard and can see a list of disabled plugins, re-enable only the basic ones, before the Elementor addons, do not enable any caching plugins in the process. Once you have the basics enabled, remove caching plugins and the ones that are giving you trouble, then install the ones you need again. If your installation is not complete, delete the folder for that plugin via FTP to remove it.

You should also avoid using caching plugins on WordPress in modern days as they seldom/do not provide performance increase and eat up your resource meter. This applies to paid hostings as well.

Cheers!

1 Like

Simply copy and paste the oversized file content to this website and replace the original once minified.

Minify is a process to reduce file size by removing spaces and useless characters in any text file, including programming files. But if you attempt to install plugins using the dashboard method, you likely won’t be needing this.

Meanwhile, if the file size limit imposed is stricter in the future, consider not using this particular plugin now. Updates and enhancements to the plugin will make files go oversize without you noticing, and soon you’ll end up square 1 again if this plugin is already too big at this time.

3 Likes

Thankkk you soo muchhhh. It was restored with these steps you said. Finallyyy. Thanx

3 Likes

Please also tell me what does this mean?

Warning : mysqli_real_connect(): (HY000/1203): User if0_35170644 already has more than ‘max_user_connections’ active connections in /home/vol1000_8/infinityfree.com/if0_35170644/htdocs/wp-includes/class-wpdb.php on line 2035

User if0_35170644 already has more than 'max_user_connections' active connections

Error establishing a database connection

This either means that the username and password information in your wp-config.php file is incorrect or that contact with the database server at sql306.infinityfree.com could not be established. This could mean your host’s database server is down.

  • Are you sure you have the correct username and password?
  • Are you sure you have typed the correct hostname?
  • Are you sure the database server is running?

If you are unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress support forums.

Hi SashaMaltese,

This simply means that your website is creating way too much datavase connections to the server itself. Likely due to heavy plugin use or poorly coded plugins. This might also happen if you attempt to update everything at once.

3 Likes

Do I have to do anything? There are lots of codes https://sashamaltese.com/ (depricated)