Moving Wordpress Site from one Cpanel Account to Another - wordpress

I can't find an answer to this particular question.
I have two cpanel accounts and I want to move my wordpress webiste from the original cpanel account to the new cpanel account.
I've tried downloading all the wordpress files and that didn't work. I've tried downloading all the files from the original site via WinSCP and that didn't work either.
I have been learning about and using various languages to create websites, etc. But I only know enough to be dangerous. So. The best answer would be one that's very literal to what steps I need to take using basic, regular-person English.
I hope someone can help!

Wordpress sites operate through a database so you can't simply copy files from one cPanel to another. There are a few different ways.
Method 1: Use a plugin
Create a fresh Wordpress on your new cPanel then use a migration plugin such as https://wordpress.org/plugins/duplicator/
Method 2: Do it manually
This is more complicated but I find it more reliable. The steps are as follows:
Download your Wordpress files
Use phpMyAdmin on your cPanel to export your wordpress database (SQL export) - https://www.hostinger.com/tutorials/export-mysql-database-with-phpmyadmin
If you are changing domains then you need to use a text editor on your SQL export to find and replace any instance of your old domain to your new one
Export your theme options (f you have them). There should be a theme option that says import/export and a long string to copy
Now you're ready to import
Upload your wordpress files to your new cPanel
Import your database in phpMyAdmin
Go to the home folder of your Wordpress install and edit the wp-config.php files to include your new database details (username, password, database name)
Login to Wordpress and import your theme options by copying the long string from point 4 into the import box (if you have options)
You should be done
Before doing any kind of migration make sure you have a back-up of your Wordpress site

Related

problem mooving woocommerce to another domain

I have a woocommerce website installed and work normally , I want to change the theme without make changes on the website so all still ( products , pages, ...etc) .
I want to copy the same website into another domain to do changes without stop my first website .
this what i have do :
1- copy all files from the old to new website.
2- import database frm the old .
3- past into the new domain all files
4- import the tables of the old database to the new database
5- change the wp-config to work with the new database
6- change the domain into table : wp_options
and i launch the new domain : the first page is ok without errors
but when i enter to preview product i have error that page dosen't exist , and all other pages the same error . can any one help me ??? any ideas ?
When moving a WordPress site a few things to make it easier.
Manually, zip up uploads/plugins/theme or if you have some crazy thing going on wp-content. Generally, nothing else needs to be moved. (this excludes things like robots.txt etc you may have to move)
After importing the DB you need to run a search and replace to swap out the domain. It is used in more places than you think.
Go to settings and re-save permalinks twice. - This fixes most issues with pages not loading/404.
There are plugins out there that make this easier.
Updraft - Don't need the paid version. Can setup new site then add files and import them.
All in One WP Migration - Haven't seen anything this doesn't move but can be slow and harder with large sites.
Plugins like All in One WP Migration or Duplicator can be helpful, but from time to time they may fail.
With AIOWM you must create a backup and a blank WP installation, install the plugin in this blank installation and import the backup. Beware that many features are paid.
With Duplicator you create a backup and an installer that you've to upload (via FTP) to the new host and there execute the installer.php script to recover the backup.
Both of them take care of the search&replace needs.
If you want to go manual, you have to copy all files via ftp, or if you've a Cpanel or similar you can upload a Zip file and then extract it via the panel (I guess you don't have the ssh access to the server).
Than you've to create a database dump via PhpMyAdmin and restore it in the new server, thank you've to change two option in the database: the site url, and the wordpress address url.
That should let you login to the website backend, but BEWARE you've to do the search and replace on your database.
To do so, easyly, you can use Better Search & Replace plugin (https://it.wordpress.org/plugins/better-search-replace/).
Guessing that http://old_domain.com is your old domain and https://new_domain.com is the new one, usually I go this way on S&R:
- Search for "old_domain.com" and replace with "new_domain.com"
- Search for "http://new_domain.com" and replace with "https://new_domain.com" if you have an active SSL certificate
Than go to Settings -> Permalink and save twice.
Everything should be fine now :)
Remember to clean every cache if you've one active.

How can I backup wordpress?

I have xampp and wordpress.
I've accidentally delete some files in the xampp directory, and xampp Apache was not working anyway.
I want to extract my posts and leave dealing with the issue for later.
How do I extract the files/posts?
EDIT: the wordpress and xampp are on my own computer.
Just log into phpMyAdmin (in xampp it should just be http://localhost/phpmyadmin) and export the wordpress database. You could then later import it into a new database and get a new installation of WordPress to access that, or else get the plain text posts out manually.
You can export all your content to a xml file (articles, pictures...) through the admin panel:
https://en.support.wordpress.com/export/
Once your new wordpress configured, you'll just have to import (Wordpress Importer plugin)
WordPress comes with a import/export functionalities already, here is a small animated gif on how to use it.
If your posts have images
it is also recommended to backup your uploads folder that its located in /wp-content/uploads, you can just zip it and save it somewhere.
Whenever you want to import your your posts again you can just unzip the folder inside the same /wp-content directory and replace old files with new ones if asked.
If you have A LOT of posts
I would also suggest to export the entire database using phpMyAdmin (xampp and also every shared hosting comes with it), here is a video on how to use phpMyAdmin to export your wp database

How to upload wordpress theme to sub domain

In my localhost(xampp) wordpress themes are installed. I activate one of them And create user name and password for the wp-admin.
And I backup database and wordpress site and upload it to subdomain(live site). After upload all content will load without CSS style-sheet. And wp-admin also not working. And url as same baseurl twice.
Question is How to upload my wordpress site to my subdomian. Clear me out. Am i missing some thing??
This is pretty much what you are looking for: Moving WordPress
It´s a quite detailed manual how to move WordPress Sites/Blogs from one server to another and moving from localhost to a live server is not much different.
If you are trying to move a complete Wordpress site from one server to another I would recommend using the plugin Duplictor.
https://wordpress.org/plugins/duplicator/
Really easy to use and does the job excellent!
I do blogging a bit. I found this video tutorial, I have used this one to successfully set up a new subdomain and install Wordpress sometimes ago.
STEPS::
Use cpanel to create the subdomain
Download the latest version of wordpress to your local drive
Upload to subdomain folder on your host
Extract the files, and move them into the subdomain folder
Use cpanel DB Wizard to create a new data base
Make a note of the username, db name and db password
Copy wp-config-sample.php to wp-config.php in the subdomain folder
Edit wp-config.php to add the username, db name and db password
Open the URL "your-subdomain.your-domain.com/wp-admin/install.php"
Fill out the fields on the form and press "install wordpress"
After creating the a subdomain, use WP clone to create and install a backup of my live site into the new subdomain. The clone site allows you to verify updates before deploying them to your public site.
Hopefully the issue has resolved already, but maybe this will be of use to others.
Thanks.
If you are trying to move a complete Wordpress site and is without plugin,
copy all the wordpress files in the htdocs/project-name to the
subdomain folder.
Then export the db from phpmyadmin,open it in an editor
Change all the url of the format 'http://localhost/your-project-name'
to the subdomain link(http://eg.example.com).
Save it and import the sql file to the subdomain's db
Change the database,username,password in wp-config of the subdomain
with subdomain's db details.
http://codex.wordpress.org/Installing_WordPress#In_a_Subdirectory
Wordpress codex gives you the steps for doing this.

How to move Wordpress to another domain without the chance to make a proper backup first?

So my webhoster closed down, where I hosted my Wordpress blog. I was able to receive a zip file containing all my data. I now have a new webhoster and I extracted the zip file to its root directory.
Trying to open my website now gives me "Error establishing database connection". The web tells me it may be related to hardcoded urls in the Wordpress database, which I need to replace by the new url.
However the tutorials usually tell you to use the Wordpress interface to create a backup of my database first, which can then be edited in tools like phpmyadmin. I can not access the Wordpress interface anymore and so far did not manage to edit the database otherwise.
I tried placing a local copy of the blog in the "C:\xampp\htdocs" folder, hoping phpmyadmin would recognize the database and allow me to edit it. Not working, maybe I am doing something wrong?
Any ideas to revive my Wordpress blog?
Cheers
Okay I think I got it working. For people having the same issue:
I loaded the database locally by copying the *.myd, *.myi, *.frm files to a new folder in my local xampp installation (e.g. C:\xampp\mysql\data\myDatabase).
I then used phpmyadmin to export this database to a .sql file.
On my webserver I then installed a fresh wordpress blog. It might be enough to copy your existing wordpress stuff, without needing to do this step afterwards, not sure.
My webhost has phpmyadmin preinstalled, so I used that to delete the fresh wordpress databases and import the .sql file instead. Now everything is in place, but since I changed my domain I need to change the URL paths in the database.
I used this script (use it by placing it on your webserver in the wordpress root folder and calling it in the browser) to do a search&replace of my old url to the new url: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
After that I only had to manually fix the path to my header image that I had edited in the past in the theme's header.php file.
Phew. Thanks for your help f00644.

Wordpress pages won't load after hosting transfer

I've just transfered a wordpress website to another domain.
For the transfer I've made the following steps:
Copied db and changed domainnames (http://olddomain.com to http://newdomain.com)
Imported db on new host (via phpMyadmin)
Changed wp-config to match new db settings
uploaded all wp files
So the homepage works, but I can't visit the other pages. However, they are showing up in my admin page.
The way I've done this in the past and have worked for me:
1- Export db from phpMyAdmin, then replace in the .sql file all references to old domain.
2- Imported db on new host (via phpMyadmin)
3- Changed wp-config to match new db settings
4- Uploaded all wp files
5- Regenerate .htaccess file, if you are using permalinks.
(you can do this the way #Riboflavin suggests)
Also, here you can find some additional information that could help:
http://codex.wordpress.org/Changing_The_Site_URL
If you are using permalinks you will need to regenrate them after the transfer. Go to Settings → Permalinks in your admin panel and choose the permalink option you would like to use and click Save Changes. This will regenerate the permalink portion of your .htaccess file for your new domain.
Are the links to those other pages still pointing to the old domain?
If so, you could try the Velvet Blues Update URLs plugin to update all the links in your site.
I've used this successfully in the past, but recommend that you back up your data fully before trying it yourself.
The fastest transfer from my experience is through cpanel using fantastico or something that installs wordpress quickly. The process is as following:
Install wordpress on new hosting through fantastico or similar app
Delete everything in installed directory except for wp-config
Copy everything from old wordpress data, except for wp-config
Paste/transfer all that data to the new host
Now export old database and delete tables on the new one then import from old db
Change site URL within database to new one
Using fantastico helps in setting up databases quickly and wp-config. No need to do it manually and waste time. Just make sure to leave the installed one and not transfer the old one.
The whole process takes me like 2-3 minutes, I think its the fastest once you get it.
You need just to adjust your new .htaccess by regenerating it
go to WordPress dashboard
Settings > permalinks
then save modifications
if it's work then well done else you need to manually change it :
you will find the .htaccess content after saving modification in permalinks page copy the contents and create the .htaccess file in the root directory

Resources