WordPress : setting up wordpress on live server - php

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 !

Related

How do I upload my Wordpress code files from previous website onto local host Wordpress website which I created via Xampp?

I have Wordpress code files from an old website which I downloaded from WP File Manager that I want to look at on my local host. I have downloaded Xampp and set up a local host Wordpress website.
How do I now upload the code Wordpress files that I have, in the admin section on my local host, so I can see the front end of the website from the Wordpress code files that I have?
I have tried uploading the files via WP File Manager on the local host version, but it does not work correctly, because it has all the code files from local host website, so it's duplicating.
Thanks for your help!
I'm no native speaker, so errors may be excused.
As it states answer and not solution, i'll try to give some directions.
Your question has nothing to do with programming. There are better sites on stackexchange for that.
No need for a new WP instance, as you have a copy of the old one. Put it under your \xampp\htdocs\ folder. I imagine WP will need an appropriate .htaccess file as well, if the File Manager didn't get you that too.
Get a copy (aka dump) of the database from the old instance. Replace all references to the original url with your localhost adress within the dump.
Create a new db on your xampp-setup and import the modified dump into it.
edit the wp-config.php if and where necessary
Hope and pray it'll run, expect errors and further work

how to migrate live wordpress site to my localhost with or without plugin

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

Trying to work on a client's Drupal site from my local machine

I have a client who wants me to update their Drupal site. I've never done this before, and I want to work on it from my local machine just in case something goes wrong. I have no idea where to even start!
First off, how do I access my client's site files so I can get them onto my computer? I've tried entering the information the client gave me into Cyberduck, but it won't give me access. Is there another way to get access?
Also, how do I host it locally? I have XAMPP, but I'm not sure how to use it.
That being said, I have found a few forums that should help me set up the local server. I just don't know how to get the files from the live server to my computer.
I know this is a super noob problem, but I could use the help. Thank you!
Well, for the basic question, you have to get the correct credentials from your client. There's no alternative, really :D
While you're at it, you'll want a copy of the site's database too.
For the question "how do I host it locally?" Here's how I would go about it.
Get the site into version control.
Given that you were given (S)FTP credentials, I'm guessing the site is not version-controlled. If that's correct, then that is probably the very first thing you want to do. This will allow you to keep track of the changes you've made on your local site that are different to the production version.
Create an empty directory on your computer.
Navigate to the directory in a terminal and run git init.
Add a .gitignore file to that folder (you can create your own, or use one customized for Drupal).
Download the site's files into the directory created in step 1.
Add the files from the in the directory to the git repository by running this command in a terminal: git commit -am "First commit of Drupal files to repository."
There's a good help page about working with Drupal in git on drupal.org.
Create and populate your database.
Get a database dump from the live site.
Create a new database and database user on your machine.
Import the database dump into your new database.
Record the database credentials in settings.php or settings.local.php and store them somewhere safe, preferably in a password manager.
Change the database credentials in settings.php or settings.local.php to match the credentials of the database you've just created.
(For safety and to avoid confusion, I always create local databases with a different name, user, and password than the live site has. This means if your local credentials are compromised, the live site isn't, and it means you can't connect to and change the live site's database by accident.)
Set up the webserver in XAMPP
Create a new site in XAMPP called e.g. example.local that points to the directory that contains the file index.php
Add the following line the file called /etc/hosts on your computer:
127.0.0.1 example.local
Test that this works in a browser by visiting e.g. http://example.local or http://example.local/robots.txt.
Move your local changes to the Production site
How you will be able to do this depends to some extent on your client's web-hosting infrastructure, and what version of Drupal your client uses. but in any case, you will have three separate concerns for changes you make:
Code changes
You will need to deploy changes you make to the code back to the server. Ideally you would probably do this via Git either by cloning directly into the live site or (far better!) as part of an automated build process. By the sound of it, you may just have to FTP the changes back up.
Be careful not to re-upload your modified settings.php or settings.local.php file!
Content changes
You probably have to test some/all of your content changes locally and then recreate them on the live site. Because your client may have made changes to the live site while you were working, you can't risk importing your local database into the live site.
Configuration changes
Changes to configuration should be managed in code (i.e. as part of 1. Code changes above) if that's possible. In Drupal 7, the Features module is usually the best way to accomplish this (here's an answer I wrote describing the Features workflow). Drupal 8 has the Configuration Manager. Be aware that these two tools can both be tricky to use well.
Your client needs to gave you access to the files so you can put them into htdocs on XAMPP, then you need the database (also provide by the client), start XAMPP, create a new database on localhost/phpMyAdmin and import the db of the site. On the proyect code go to sites/default/settings and change the db settings to your local settings. Then you can go to localhost/{your-proyect} and it should work.

Issue importing wordpress db into godaddy

I have a local working Wordpress site and now I'm trying to import the db on a site hosted in Godaddy but it's telling me it can't connect to the database.
Basically I need db name, user and pass in the wp-config and I created manually the db in Godaddy to make sure the table prefixes are the same. Also, Godaddy won't take localhost in the wp-config, you have to use their ip address with a port, something like: 127.0.0.1:1234. The only thing I haven't checked yet are my privileges. Not sure what the defaults are in Godaddy.
For those Godaddy users, Am I missing something? Thanks.
don't upload your local wordpress database like that!
When you create articles, post, pages, etc locally with wordpress it fills your database with your local links. Even if you push it to your new godady database, all the links won't work.
Here is what you have to do:
Create a new database in godady (done)
Create a new user and password for the db with all the priviledge (you have to this, very important)
Upload and install wordpress to your new domain (follow the install tutorial)
Register your dbname, user and password (localhost will work as the db is one godady, but you can put the IP)
Upload your local theme to the new domain (update only the theme, uploads and plugins).
If needed, set up the htacess and permissions to be able to upload files
Download WP Migrate DB on your local project and export the db with your production website info. If you are unsure, install the plugin on the production site too, simulate an export and copy the info to your local project
Upload the migrate database to gadady and then rock'n roll =)

Trouble migrating WordPress from local server to host

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.

Categories