I'm having trouble migrating a Wordpress site I've been working on from my local machine onto a host.
I've been through the documentation and as far as I understand, I have to:
Export the wordpress database from my local server.
Edit the wp-config.php file to suit my target server.
Change the URL's in the settings to suit my target server.
Import the database on my target server and move over the adjusted wordpress installation onto my target server.
I can do all of this, but my there seem to be some problems: in my hosts phpmyadmin I can't view or edit any users and neither can I create any databases (there's no option for it). When I try to import a database I get an error: #1046 - No database selected.
What do I not know/doing wrong?
If importing a database, you need to create one first with the same name, then select it and then IMPORT the existing database to it.
I can do all of this, but my there seem to be some problems: in my hosts phpmyadmin I can't view or edit any users and neither can I
create any databases (there's no option for it).
If you're going through CPanel, you won't be able to add a database directly through PHPMyadmin. You should go to your host's home page and look for some wizard to create a database. (it should be next to the PHPMyadmin link.
Alternatively, for moving wordpress, You can install wordpress on your live site, then export your localhost content via Wordpress's dashboard and then import it on the live site.
This article on Moving Wordpress will also be helpful.
Related
I couldn't trace the issue while migrating.
I am using XAMPP server in local machine and I have tried to export live site and then import it by "all in one wp migration" plugin but I got "theme not found" error when I visit my site locally. the website is working perfectly on the server.
I have performed the following steps:
export and download site from the server's wp-admin panel.
install and activate "all in one wp migration" in my localhost wp-admin.
import the downloaded site in my localhost.
now it prompts "successfully imported" and have the link for setup permalinks.
when I click on it I found internal server error.
I would suggest to perform a manual migration which is done in few easy steps:
1) Archive the folder of your website from your hosting account;
2) Go to the phpMyAdmin and export the database connected with the Wordpress (which you can see by inspecting the wp-config.php file, where you can find the database username / database name and password);
The next step is to download both of the 'backups' of your website (the archive and database export) then simply extract the archive in your xampp section where it is loading and then create a database on your local phpMyAdmin where you can import the one from your hosting account. By following those steps you should have successfully migrated the database and website files as they need to be without relaying on a plugin that could (and will) mess things up. If you encounter any issues afterwards as mentioned in the previous replies enable the debugging from the wp-config.php file and enable the 'Display Errors' from your PHP.ini of your XAMPP.
Also make sure that the php version that you are running on XAMPP is the same as the one of your host, to make sure that there aren't any issues such as plugins requiring higher version or lower one.
Hope this helps.
use All-in-One WP Migration Wordpress
I built a database and website using Xampp which allows me to use and test php and a database which is hosted on localhost. I now want to move this to a live server. I have moved the website to a live server using 123-reg. How do I move the database?
I have tried exporting the phpmyadmin db and placing the sql file in my live directory, not sure of the next steps. Unlike other hosting websites, 123-reg does not seemingly have a phpmyadmin option as a web tool. It does however have something called "MariaDBDatabases". Can I use this somehow?
Yes that is the correct way. You just have to export your database on localhost. Then import in your live database given in link
Go to export option. click on GO.
Make a new database.
And Import in that
Yes off course.
Generally, hosting providers don't provide insecure links like http://anything.com/phpmyadmin as DB access location.
Instead of that, they provide UI in control panel ( dashboard ) to access all the features.
It ensures the added security to avoid your custom database from unauthorised exploitations.
I don't know the UI features of your host provider exactly, but as you said, click over MariaDBDatabases, create a new DB (Copy that), create a new User (Copy that along with the password).
Now click over DB just created, I hope it will redirect you to phpMyAdmin.
There you can import your SQL.
Now all you have to do is, change the DB Credentials in your project.
There is a site at my job that has only been maintained by 1-2 developers for a while but as more developers are being added to it we want to implement git. The workflow we're looking for has everyone using a local copy that is connected to the same remote database. We can all push and pull code as needed while any database changes would be shared that way.
I'm running into a weird issue where many files are refusing to load or clicking on any link results in a redirect to the xampp dashboard.
I downloaded xampp and created a directory in htdocs called local_test. I downloaded all the sites files into that directory with ftp. Grabbed the dbs info from the host and whitelisted the outside ip address on the host.
I went into wp-config.php and changes all the db values so it connect correctly. Plus I added:
define('WP_SITEURL', 'localhost/local_test/');
define('WP_HOME', 'localhost/local_test/');
At first I was convinced it was a db issue, but I can connect to the database remotely just fine using mysql workbench so I doubt it's that. The footer and the header show up, just not much of the content in between and like I said whenever I click on a link it redirect to the generic xampp dashboard.
I am transferring WordPress theme from one server to another, the other developer provided me
1- all the files from public_html folder
2- exported SQL file for site to be transferred
now this is what I did, I did upload all the files to public_html folder in new hosting, created a new database and assigned it a new user with all privileges and updated wp-config.php
I've to install wordpress in my server. Now confusion is that when I try to install wordpress its creating a database and once i am installed I've 2 databases one that I imported one that wordpress got during installation and I am not sure which one to link with wp-config.php please help me with it how do I manage this problem
You should run the wordpress installer in your new live server, let it create the database, and only export the tables of your previous server's database and import it in the new.
Note that there might be entries in the database that have urls with the previous host (if both your servers have the same host it won't be an issue).
After you create the database, restore it from the backup of the database you have using PHPMyAdmin
Make sure the domain name on the database is correct, I think you need to change it on wp_options table (2 places)
Should work fine, if not, send me a chat message
if you have all content from publichtml, and you have some domain as before, you do not need to reinstall it.
Import database, update the wp_config.php, copy all files from publichtml in your new document root of the webserver and you should be done.
Export database from current installation.
Upload all files to public_html folder.
Install wordpress.
(During installation, keep credentials same as the previous installation).
Once installed.
Go to phpmyadmin, find newly created database.
Select all tables, Drop all of them.
Now import previous database.
You're done !
I have created a WordPress project in my localhost, this is working.
I sent my project to git repository for hosting this in my VPS, I cloned the project in my VPS and imported my local database to remote database.
My Wordpress is hosting in remote, but why when I try access admin area with url hwsystem.com.br/wp-admin, this redirecting me to http://localhost/wp-login.php?redirect_to=http%3A%2F%2Fhwsystem.com.br%2Fwp-admin%2F&reauth=1 ?
How can I fix this problem?
I found where the problem is!
This problem is because I import database of my local database, where options_value of options_name in wp_options table is http://localhost, I just change it to my remote domain and is working.
When You move your files please login to your database and update the wp_options table site url and home url fields to your actual location.
Then login to the back end and update all permalinks
All done!
In your wp_options table in the MySQL DB, change the site url value to the remote site's domain name (i.e., hwsystem.com.br). It's most likely currently set to localhost You can also make this change within the admin interface, but seeing as you cannot access it, you'll need to change this value directly within the database.
Depending on your comfortability with MySQL, you can easily update this value with a SQL command, or use a GUI application such as HeidiSQL.
Moving a Wordpress website from localhost to online is not that simple, some times there are a lot of urls you have to change instead of only dealing with wp_options for example images path usually include the full localhost address.
The best and simplest way to make this right is by using this plugin: Duplicator
It will make any needed change it needs to happen, check it out.
You can also try to search and remove/replace localhost strings or anything else with this tool also https://github.com/interconnectit/Search-Replace-DB this works too.