Menu

Moving Wordpress Blog To New HostInitially when you cannot learn about Wordpress skip installing Wordpress and cannot be ignored in learning how to switch web hosting when needed. This is a very fast, safe and convenient.

WordPress Web Design Education Code Create an avatar:  To install WordPress with two common ways, the first is that you can download the installer from wordpress.org then take steps to install WordPress, there are also other ways when you use cpanel is the webapp or use the quick ... install the substance is used alone or by downloading the installer from wordpress.org.

You can Install or move fast WordPress hosting as per following method:
Step 01: Access wordpress.org and download the installer for
Step 02: Access the setup cpanel upload it to
Step 03: Install as normal after creating the database.

Or moving their hosting also use similar methods
  • Step 01: cpanel access and data compression zip
  • Step 02: Download the zip file containing the data
  • Step 03: Access the new cpanel hosting and upload
  • Step 04: Install as normal after creating the database and database entry
Basically as you know the way out are quite simple and very clear steps. However if you use a slow network and flutter the download and upload data to back up quite time-consuming, it can take up to 15-20 minutes.

Now here we are share the code that by this a new hosting  will automatically download data from wordpress or manually download the data from the old hosting.

The code is as follows:
<?php
// CONFIGURE YOUR INSTALL HERE
echo "<pre>";
echo "00: Setup WordPress";
$install_folder = "wordpress";
$wordpress_archive_url = "https://wordpress.org/latest.zip";
echo " - done \r\n";

// Execute

//Download File
echo "01: Download WordPress";
$file = "$install_folder.zip";
file_put_contents($file , fopen($wordpress_archive_url, 'r'));
echo " - done \r\n";

echo "02: UnZip WordPress";
// get the absolute path to $file
$path = pathinfo(realpath($file), PATHINFO_DIRNAME);

$zip = new ZipArchive;
$res = $zip->open($file);
if ($res === TRUE) {
  // extract it to the path we determined above
  $zip->extractTo($path);
  $zip->close();
} else {
}

echo " - done \r\n";
//Delete Archive
echo "03: Done";
//unlink($file);
echo " - done \r\n";
echo "</pre>";
echo "by <a href='http://theson.net'>Theson.net</a>";
?>
First you access to cpanel manage your new website, then create such wp.php file, then copy the contents of that file.

Then you just go under your domain eg http://theson.net/wp.php to run the code. After you delete the file that is going to be. Code on his good run on my web ie php cpanel and support.

Note: You can look at line 6 then shows the path https://wordpress.org/latest.zip replace it when you make the switch hosting WordPress. In the above code implementing new WordPress installation.

On line 36 you have 2 marks ie // I'm not so functional that you remove 2 // mark it off. It is the function deletes your zip file after download. With the large size zip file of several hundred MB when you switch hosting usually automatic decompression error, you need to keep then extract using cpanel.
 
Top