how to Configure WordPress with another database? - php

As WordPress uses a wp-config file for connecting with the main database, and usually the database server is hosted on the same platform. But I want to use a third-party service or database provided by another hosting platform.
For example,
The website is hosted on Siteground and it will use database services from Bluehost.
I have tried this by setting all the details in wp-config file,
dbname
username
Password etc.
but I'm facing Error Connecting With Database. Could you please suggest to me, Is it possible with WordPress or what are the other ways?

Related

How to publish a website built by HTML and PHP?

I built a website (localhost) using PHP and HTML through XAMPP. Now, I want to publish it online (webhost), available to everyone. What should I do? Thanks in advance!
First you need a host to upload your files. For this purchase hosting space from godaddy, bluehost or someother provider. You need to purchase a domain too. After domain and hosting space, if you have purchase linux hosting, then 90% chance is that you will get a cpanel. So log into your cpanel then navigate to 'public_html'. Inside this, using some ftp client like filezilla, or cpanel's build in upload feature, upload all your files. If your website needs a database, then you need to create a database, add database user and password using database wizard tools in cpanel.
When you will purchase a hosting, these things will be very clear once you login and expore a little.
Moving a website to another host consists of the following steps:
Moving the website's files.
Moving the website's database(s) (if any).
Configuring your application to work at the new host.
Pointing your domain's DNS to the new host.
A more detailed breakdown of these steps can be found below:
Transferring the files to the new host
The most convenient way to transfer your website's files to your new web hosting account is via FTP. You should connect to your hosting account and download the files locally to your computer. Then you have to upload them to your new hosting account's main folder (usually public_html, www or httpdocs).
More information on how to use FTP can be found in our FTP tutorial.
Transferring the website's databases
You have to export the database content from your old hosting account (usually into an SQL file), create a new database at your new hosting company and import the information in it. For detailed information on how to import/export databases via phpMyAdmin you can refer to this tutorial.
Application setup on the new host
This really depends from the website application that you are using. For step-by-step instructions on how to reconfigure some of the most popular applications
Check this out https://www.heroku.com/. The website will update as you push your code to the git. It's free, easy to use and good for small project.

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 =)

Is it possible to use CouchDB as wordpress primary db?

When setting up wordpress localy in my Virtualbox ubuntu image. i input couchdb credentials as the default db for wordpress, but it is failing to connect to my couchdb host saying,
This either means that the username and password information in your
wp-config.php file is incorrect or we can't contact the database
server at http://192.168.92.1:8101/. This could mean your
host's database server is down.
Are you sure you have the correct username and password? **yes**
Are you sure that you have typed the correct hostname? **yes**
Are you sure that the database server is running? **yes**
My couchdb database is up and running in http://192.168.92.1:8101/. And crated a db called wordpress there.
My question is, Is it possible to integrate couchdb with wordpress if so what is the wrong with my configuration?
and my last question is:
Is there any CMS system that can integrate with couchDB such as markuso like we integrate Wordpress with mysql?
nope. wordpress requires mysql.
https://wordpress.org/about/requirements/

Migrating wordpress server and use the old database

I have to migrate the files from a website in Wordpress to a new server, however I would like the database to stay on the old server.
I tried to 'wp-config.php' change 'localhost' to panel PHPmyadmin: 'http://admin.*****.com/mysql/' put me back: Error Establishing a database connection.
the users and passwords'm sure that is correct, the url I'm not sure, Its possible?
Thanks.
If on shared hosting, you most likely have to enable 'Remote MySQL' to allow for external connection to the database. Check with your host to see if you have access to this feature or for documentation.
GoDaddy Connecting Remotely to Shared Hosting Databases
Hostgator
If the database stays on the old server you have to change localhost in the wp-config.php on the new server to the MySQL-Server-Address of the old server

Transferring files from localhost to Bluehost

I have all the PHP files and mysql database created on localhost through XAMPP. I have an account on Bluehost. Now I want to launch my website. So where to transfer the PHP files and where to transfer the mysql files on Bluehost? I know I can do it through FTP but I don't know where to upload these files to get the website running?
Apart from that I have one more doubt. Suppose I create a database directly on web server using phpmyadmin facility provided by Bluehost and try to link my php file kept on local host to that database what's the procedure?
You upload your files to the folder your domain is setup for, if you are using your main domain setup on bluehost (you can have multiple domains on same account, but they use different subdirectories of public_html) just put the files in public_html
As for the database you export your database on localhost (mysqldump or export feature of phpmysqladmin or whatever you use) and import it using the phpmysqlamdin import feature
and if by "link my php file kept on local host " you mean how do you change the php files to connect to the bluehost database you just change the mysql connections to use localhost, and the username and password of the database you setup on bluehost.
You can setup databases using bluehosts database wizard, it will walk you through making a database and setting up a user, those will be the database name, username and password you will need for the mysql connections.

Categories