Posted on

Restoring or Migrating WordPress Without Plugins: The Definitive Guide to the Manual Method

Modern WordPress backup plugins (like UpdraftPlus, All-in-One WP Migration, etc.) have greatly simplified site restoration and migration operations. However, there are situations where you are left with only the “raw” backup of the site—that is, the file folder and the SQL database dump.

If you find yourself in this situation, don’t panic! The manual method, while requiring a little attention, is perfectly valid and will allow you to get your site back online. This guide will walk you through the process step-by-step.

🎯 Prerequisites: What You Need to Have Ready

Before starting, make sure you have:

  1. The complete WordPress file folder (the one that includes wp-admin, wp-content, wp-includes, wp-config.php, etc.).
  2. The database export file in .sql format.
  3. Access to your cPanel/Plesk or hosting control panel.
  4. An FTP client (like FileZilla) and login credentials.
  5. A text editor (like VS Code, Sublime Text, or Notepad++ – not Windows Notepad) to modify the SQL file.

Step 1: Preparing the Destination Environment

First, we need to prepare the space where the site will be restored.

1.1 Creating the Folder and Uploading Files

  1. Create the Folder: Access your hosting control panel and create the domain or subfolder that will host the site (e.g., public_html/newsitesname).
  2. Upload the Files: Use your FTP client (or the cPanel File Manager) to upload all files and folders from your backup into the folder you just created. This process may take several minutes depending on the size of your site. ⏳

1.2 Creating the New Database

  1. Create the DB: Go to your hosting control panel and create a completely empty new MySQL database (for example, through the MySQL Databases section on cPanel).
  2. Create User: Also create a new user for this database and grant them all privileges on that database.

💡 Important: Make a note of the Database Name, the Username, and the Password of the newly created database. You will need them later.


Step 2: Database Adaptation and Import

This is the most delicate step, where we tell the database to “know” what the new site address is.

2.1 Modifying the SQL File (URL Replacement)

The WordPress database stores the old site’s URL in many tables, which is the main cause of problems after a manual migration. We need to correct these references:

  1. Open the SQL File: Open the .sql file of your backup with an advanced text editor (like Notepad++).
  2. Perform Replacements: Use the Find and Replace function to update all references to the old address:
    Find (Old Domain) Replace With (New Domain)
    https://www.olddomain.com https://www.newdomain.com
    http://www.olddomain.com http://www.newdomain.com
    https://olddomain.com https://newdomain.com
    http://olddomain.com http://newdomain.com

    Attention: It is essential to replace both versions with and without www. and both http and https to avoid issues. Make sure your editor handles replacement across the entire document and save the modified .sql file.

2.2 Importing into the New Database

  1. Access phpMyAdmin: Through your control panel, access phpMyAdmin and select the empty database you created in Step 1.2.
  2. Import: Click on the Import tab, choose the modified .sql file from your computer, and start the import.
  3. Verify: Once the import is complete, the database will no longer be empty and will contain all the tables from your old site.

Step 3: Connecting Files to the New Database

The final step is to tell your WordPress site (the files) what the database credentials (the data container) are.

3.1 Modifying the wp-config.php File

  1. Locate: In the file folder just uploaded to the server, find and open the crucial file: wp-config.php.
  2. Update Credentials: Look for the following lines and modify them with the data of the new database you created in Step 1.2:
    // The name of the database for WordPress
    define( 'DB_NAME', 'new_database_name' );
    
    // MySQL database username
    define( 'DB_USER', 'new_database_username' );
    
    // MySQL database password
    define( 'DB_PASSWORD', 'the_new_database_password' );
    
    // MySQL hostname (usually 'localhost')
    define( 'DB_HOST', 'localhost' );
    
  3. Save: Save the wp-config.php file and re-upload it via FTP to the server, overwriting the previous one.

🚀 Launch and Final Test

Your site is now online!

  1. Test the URL: Try opening the new site address (https://newdomain.com) in your browser. You should see your restored site.
  2. Verify Login: Try logging into the administration area (https://newdomain.com/wp-admin) with your old credentials.
  3. Permalinks: If the site shows “Page Not Found” errors (404), go to Settings > Permalinks in the administration area and simply click Save Changes without altering anything. This “refreshes” the permalink configuration on the new server.

Congratulations! You have manually restored a WordPress site using only the files and the database. 🎉

Posted on

auto-generate INSERT statements for a SQL Server table

  1. Right-click on the database and go to Tasks > Generate Scripts.
  2. Select the tables that you want to generate the script.
  3. Go to Set scripting options tab and click on the Advanced button.
  4. In the General category, go to Type of data to script
  5. There are 3 options: Schema OnlyData Only, and Schema and Data. Select the appropriate option and click on OK.

Posted on

SQLSERVER – Backup on mapped drive

Scenario

You are trying to backup a sqlserver db on mapped network drive. You have already mapped the drive in Windows and you can see that drive in Windows Explorer. You are not able to see the drive which is mapped when you open the backup procedure using SqlServer Managment studio.

Solution

First of all you not need the previous mapped network drive created by Explorer. You have to create this drive using SqlServer, and you’ll not be able to see it using Exploer.

Enable xp_cmdshell

You need to execute below to enable xp_cmdshell as its disabled by default due to security reasons. (Please turn off again once you done with the work)

Using SSMS execute thesse commands :

EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXEC sp_configure 'xp_cmdshell',1
GO
RECONFIGURE
GO

After this you ‘ll have a positive reaction a this command that using SSMS you should use for testing previous operations :

EXEC XP_CMDSHELL 'Dir C:'

Map Network Drive

To map network drive you have to use the same command that you should use over Windows ysig command prompt :

'net use Z: \\networkShare\Test'

So, using SSMS you have to run the command

EXEC XP_CMDSHELL 'net use Z: \\networkShare\Test'

Now you should test this connection with the command

EXEC XP_CMDSHELL 'Dir Z:'

but, the most important goal, is tha you’ll be able to see teh drive Z during backup proceure over SSMS

Map Network Drive cmd – net use user password

The above command will work and completes successfully without asking the user to provide a username/password if the user has authorized access to this network share. If not, But the easy way is to use the “net use” command on the command prompt line explained above.

net use Z: \\networkShare\Test /u:domainname\username password

So, using SSMS you have to run the command

EXEC XP_CMDSHELL 'net use Z: \\networkShare\Test /u:domainname\username password'
Posted on

Move a mysql – mariadb database from one windows server to another windows server

Install xampp on the new server and If mysql is on, turn it off.

In the folder C: \ xampp \ mysql \ data create a new folder, for example with the name of the database you are moving.

Copy in it all the data files (.frm, .ibd, .myd, .myi) from the relative folder of the old server.

Make a copy in a backup folder of the file ib_logfile0, ib_logfile1, ibdata1 those are in the folder “C: \ xampp \ mysql \ data” in the new server.

Copy the files ib_logfile0, ib_logfile1, ibdata1 from the old server to the same location as the new server, i.e. in the folder C: \ xampp \ mysql \ data

Start mysql. Open a dos prompt, go to the directory

cd C: \ xampp \ mysql \ bin

mysql -u root -p

show databases;

You should see the new database added to the previous ones.

Open another dos prompt and check the tables with the commands

cd C: \ xampp \ mysql \ bin

mysqlcheck -uroot -p YOURDATABASE

Open your browser and connect to phpmyadmin with http: // localhost / phpmyadmin

You should see the database and tables.

Posted on

Opening a csv file in Excel. How to keep all leading zeros in fields

When you open a csv file in Excel, if you have data that contains zero (0) at the beginning, it will be transformed into numbers losing the leading zero. Let’s see how to avoid losing the leading zeros.

Do not open the csv file with Excel. Instead, open Excel with a new sheet. Go to the “Data” tab and press “from text / csv”.

Upload your csv file now. A new window appears which performs a data transformation.

Above you have some important choices.

Excel figured out which the csv file delimiter is. Note: use this procedure also when you are importing data saved in a csv file with a different delimiter from your standard.

Excel tries to figure out the data type for each column “based on the first 200 rows”; I recommend that you select “based on the entire dataset”. This way Excel should understand that the column with zeros contains text and not numbers. Press “Load” to end the procedure or “Transform Data” to force other choices if necessary.

Posted on

installing sqlserver 2008: Performance counter registry hive consistency check failed

if, during installation of Sql Server 2008 you have this error : Performance counter registry hive consistency check failed

First try

Open a command prompt with administrator user rights (Run as Administrator)

cd c;/windows/system32
lodctr /R:PerfStringBackup.INI

Restart the system and try again to install sqlserver

Second attempt

Open a command prompt with administrator user rights (Run as Administrator). Lunch install without that feature

C:\MyFolder\SQLEXPR_x86.exe /ACTION=install /SKIPRULES=PerfMonCounterNotCorruptedCheck
Posted on Leave a comment

Sql Server 2014, Integration Services and Oracle

SSIS and SSDT on SQL SERVER 2014

SSIS is not present on Sql Server 2014. To create Integration Service packages, you must download and install SQL Server Data Tools (SSDT).

Download SSDT

You will also use this tool to convert SSIS packages created with Sql Server 2008 into the new project format.

Connect to Oracle from SSDT on SQL SERVER 2014

To connect to Oracle through ADO.NET in the SSDT environment, you must install an Oracle client. You’re definitely working on a 64-bit machine. You must download the 32-bit client and install it by choosing the “Administrative” installation type.