3

enter image description hereI moved my live Wordpress site from my hosting provider to localhost but when I go to load the website it takes me to the wordpress installation page. When I try to go to wordpress install I am hit with an 403 Forbidden message.

I moved wordpress by downloading the FTP files.

I am running XAMPP on windows. I have edited the wp_options database table and changed references from the live site to localhost. I have also updated wp_config.php.

J Code
  • 454
  • 1
  • 7
  • 20

8 Answers8

2

very easy to move wordpress from one server to another

  1. Install clean wordpress on your new destination (make sure to set-up the databse also)

  2. Copy the wp-content folder from your source, and replace the wp-content folder of your destination

  3. Export the database of your source, drop all the tables in your destination, and import that database from your source to your destination.

  4. update site_url and home_url inside wp_options table in your destination

DONE!

in case you want to update all URLs from your source to the URLs of your destination.

You can simply edit the sql file before importing to your destination database using something like notepad++ and find replace

e.g.

find yoursource.com
replace all with yourdestination.com

or you can use update url plugin,

silver
  • 4,433
  • 1
  • 18
  • 30
1

The easiest way is to install the "Duplicator" plugin in your working Wordpress installation. From within that you can easily create a ZIP package and an installer file, copy that to any other server (including localhost) and install your Worpress site there after you filled in the settings of your local database.

Johannes
  • 64,305
  • 18
  • 73
  • 130
  • Migrating an installation to some other hostname without using a plugin like Duplicator is a huge pain in the xxx neck. It requires changing tons of options and editing hyperlinks embedded in posts and pages and other places. It has never been easy, but with the complexity of modern WordPress instances, it's almost impossible to do without the help of a plugin even if you are https://ma.tt . – O. Jones Sep 12 '22 at 00:05
  • I understand that it is easier to use duplicator but I don't have the option to use that right now. Do you know why it shows me the welcome/installation page for WordPress when I go to load the homepage after transferring everything from FTP? – J Code Sep 12 '22 at 01:27
  • You have to adjust the database settings in the `wp-config.php` file (fill in the settings for you local server and database), and you would have to replace any instance of the "old" website URLs (i.e. the first part, which defines the server down to the installation directory) with the new ones in *all* database tables and fields, which theoretically can be done with any text editor, but usually is more complex than expected. – Johannes Sep 12 '22 at 08:25
  • Thanks for your response. The database is connected properly (I verified with wp-cli) and I have changed the URLS but it still shows me the installation page. – J Code Sep 12 '22 at 23:16
1

Hi You need to change wp_options table in your database, In wp_options siteurl and home option value to your localhost url.

also check wp_config.php file if it contain your live url. After changing those url run your site on localhost, it will fix your problem, if still you get 403 error then check file permission.

Mukta Chowdhary
  • 184
  • 1
  • 8
1

You have to migrate your database from your local server to Live server.

Can also Edit wp-config.php File.

define( 'WP_HOME', 'http://yourWebsitleURL.com' );
define( 'WP_SITEURL', 'http://yourWebsitleURL.com' );

You can do one more thing, Update your website URL in wp_options Table.

The last thing we need to do is verify the changes. Open the wp_options table and check the option_value of siteurl and home. You should see your new URL.

enter image description here

Also can take backup using WP-All in One

  • Install wp-AllInOne
  • Create Backup and download it
  • Install a clear Wordpress on your cpanel web url (make sure your php and Wordpress versions are same)
  • install wp-AllInOne Plugin on your clear new wordpress
  • Import your Backup

your Website will be ready no need to do any king of configuration.

Umer Rasheed
  • 138
  • 2
  • 13
0

Easy way to migrate WordPress hosting to localhost. You can install the "All-in-One WP Migration" plugin on your website and export the data then you can install WordPress on your localhost and also install the "All-in-One WP Migration" plugin then import the export file.

0

Please take backup of the live Wordpress website using duplicator plugin https://wordpress.org/plugins/duplicator/

After backup you can download installer.php & .zip file

Then new Wordpress installation in localhost after new installation is done then simply go to localhost wp-config.php file and copy hostname, database name, username name, password and save in safe place then put the duplicator plugin backup file on that localhost wordpess installation directory and remove the localhost new wordpress installation files not duplicator plugin backup files

open localhost/directoryname/installer.php further implemention of the backup please check the plugin guidence https://wordpress.org/plugins/duplicator/

0

You have two main options: Use a duplicator plugin, and install it on both servers. Then export the data and reupload it. https://wordpress.org/plugins/duplicator/

If not, make a copy of your WordPress directory, and database for WordPress. Then reupload them both to localhost.

Hope it helps!

0

Check $table_prefix value in your wp-config.php file. You are seeing installing page most likely because of this.

Let's say your production has a table prefix of $table_prefix = 'asdf_'; and your local has $table_prefix = 'wp_'; Then you will see the WordPress installation page even if you did the rest correctly.

Myo Win
  • 483
  • 1
  • 6
  • 17