how to install wordpress on existing database - mysql

I have a website already built in PHP with MySQL as database.
Now, I want to move on to Wordpress but keep my existing db.
How can I install WordPress and make it work with my existing custom database that I developed during my previous custom website.

You need to install WordPress using the existing database credentials. Setup will create all the tables required to run WordPress on your existing database and rest of your database tables will remain as it is.
Now you can use your existing tables as per your need in WordPress

First install fresh WordPress with DB connections. Then port existing data from old tables to new tables like below queries:
insert into NEWTABLENAME select * from OLDTABLENAME.

It pretty simple.
During Wordpress database information setup
Just write your new site or database name in the table prefix_..(name of new site)
hit summit wordpress will start a new installation
Check image:

Related

I deleted database of my wp website and wordpress asks to be reinstalled

I deleted database and db user of my WP website. My website stopped working.
I opened wpadmin.php and created database and user according to info in it.
Now when I try to open my website it redirects to
http://iiuischoolsryk.com/wp-admin/install.php
What should I do now? Should I proceed to Installation?
PS:
Although hosting provider is my best friend, he is not available to help
I have access to Cpanel, phpMYADMIN.
I have complete installation files of that particular wp theme.
All your previous data, unless backed up, is totally gone. You'll have your theme and plugins still in their directories, but no pages, posts, etc.
To get back to having a blank wordpress installation, do the following.
Create a new MySQL database, via phpMyAdmin if you like.
Create a new MySQL user, with password, and assign them permissions
to the database created in step 1.
Now run the 5 minute WordPress install with the database name, user
name, and passwordyou've just created.

WordPress Error establishing a database connection (xampp)

I am using xampp to host my website local. I am making a WordPress site with the MySQL database from xampp.
Now, I bought a new computer and took backup of my WordPress folder. Now when I try to open my WordPress site on my new computer, I get the error: Error establishing a database connection
I can image this is because the database that is linked to the WordPress site is not on my new system.
I formatted my old drive so I cannot restore the old database. Is there a work around?
If you have your old database file (.sql) then you can just
Run this link from your browser http://localhost/phpmyadmin.
Select Database which you want to upload the SQL file. (If no DB , create new database).
Click on Import option from top menu section and upload you files.
and for taking backup of your database on Xampp
1. Run this link from your browser http://localhost/phpmyadmin.
2. Select Database which you want to take backup of.
3. Click on Export option from top menu section and backup your files.
If your old drive is completely formatted, and you weren't using any sort of Wordpress backup plugin, then no, you won't be able to rebuild the site. Sorry! As well as storing your content (posts / articles), your Wordpress database also stores information on which plugins you were using, so it is an critical part of rebuilding any Wordpress site.
Next time around, you should export your database to a file (eg .sql), so you can import it on your new server/laptop. You would achieve this by either using a Wordpress plugin, or on XAMPP by using phpMyAdmin. You could also do this with 3rd party apps, like SequelPro or MySQLWorkbench.
You should have your images and static assets saved - eg css files, uploaded images, so you have something to start with, if you decide to rebuild your site without the database.
You need to install your wordpress site again with new database. You already lost it. Always backup your wordpress site.
You can backup your wordpress site with this plugin and it's free-
https://wordpress.org/plugins/updraftplus/
Thanks
BanyanTheme
Step 1: Backup your database on the old computer.
Step 2: Restore the database onto the new computer.
Step 3: Run file install in wordpress
Good luck!

Two WordPress Sites (separate DB) on One Windows Server?

I have a server that already runs a WordPress site and I wanted to know if there is a way to add another entirely different WordPress site operating on its own Database on the same server. How can this be done on a Windows server?
There are two ways to do this. The first is to just create a separate MySQL database for the new site. You can do this from either PHPMyAdmin or from the MySQL console fairly easily.
CREATE DATABASE `my_new_wordpress_db`;
Then when you do the second wordpress installation use the new database instead of the first database when it asks you for a database name.
Alternatively you can put both installations in the same database but use different table prefixes instead. During the install wordpress provides a "table prefix" option which you can change to something else to allow both sites to be stored in the same database at the same time. You can also find this option on on line 62 of the wp-config.php file.
$table_prefix = 'wp_';

Ezpublish create new Mysql database after the old Mysql database got deleted

Recently I setup a website on byethost.com using the CMS ezpublish. After a couple days of working on the site, byethost deleted the Mysql database. I still have all the FTP files but I can't log in as an admin because their is not Mysql database with all the users. Is there any way I can create a new Mysql database setup for Ezpublish. All I need currently is an admin account and whatever other information is essential to have for Ezpublish to run. Any response/ideas would be great.
Just create a new database
Then, for a plain site (not ezflow neither ezwebin) import those files : kernel/sql/mysql/kernel_schema.sql and kernel/sql/common/cleandata.sql in MySQL.
The admin username will be : admin and the admin password will be : publish
By the way, an other solution is to edit settings/override/site.ini.append.php and change this:
[SiteAccessSettings]
CheckValidity=false
to this:
[SiteAccessSettings]
CheckValidity=true
Reloading a page will lead to launch the setup wizard just like if it was a fresh install. (If it doesn't work, you may need to clear the cache by yourself and try again)

How can I create a secondary database to run alongside my MediaWiki server?

Firstly, my aim is to create a database to store statistical information about my wiki articles, that is derived using extensions that I have written for my MediaWiki server. Then via another extension on my server, I wish to access this secondary database and use the information to edit the output of the final article page.
I wanted to try and make a separate database to avoid introducing errors to the existing MediaWiki schema. Is this possible? I can't find any information about running an additional mySQL database alongside a MediaWiki installation.
I feel as though the better solution may be to add a table to the existing schema, but I'm not sure how to deal with the existing infrastructure without breaking it. I believe I can just use standard CREATE commands but mySQL is unfortunately not my strong point.
Thanks
Hope i understood your problem. say you have media wiki server or a mysql server running on port 3308 and you want to create another mysql instance.
Follow this step:
bkp my.cnf file
start first instance on port 3308
chnage my.cnf settings & make it run on 3307
start second instance of mysql
If you have good h/w,swap/RAM, you can easily create such 4-5 instances & all will be running good.
You can run a separate database along with the primary MediaWiki database. You just have to open a connection to it specifically using the PHP MySQL API.
Adding a new table to the existing database though is really easy and probably your best bet. You will be able to take advantage of the built-in database load balancing if your site ever gets big. To learn how to create a new table from an extension, check out this page of documentation.