Using same database for multiple wordpress websites - wordpress

I want to use the same database for multiple WordPress sites. The products should be same in both sites but front end differs.
Is there any way i can accomplish this? So that i can save fhe database of products and just use to create another site without wasting time to upload products.

I don't think it is possible to use One Database for Multiple Wordpress setup on different Domains because Wordpress Database stores SITE URL in wp_options and wp_posts frequently.
And there is no option to switch SITE URL dynamically.
One option I can think of is running a script that executed daily in CRON, script clones everything from one database to another AND also update URLs in the database dynamically.
That should copy all the content you add in one database to another.
Let me know if you have more concerns. Thanks.

This wouldn't be possible unless you were to change the prefix of the tables for one WP install, but then you still wouldn't have the same content on both sites.
Maybe try out WordPress Multisites, I think this might help you in this instance.

Related

I have a backup of the Wordpress folder but not the SQL database, is it possible for me to recover the website for local use?

I have a backup of the entire Wordpress folder of one of my old websites but, unfortunately, I forgot to also make a backup of the database for it. It's been years since the website expired so there's no way I can get the SQL file that way, and both Wayback Machine and Google don't seem to have any caches left of it (a tutorial I saw mentioned trying that way).
Is it still possible for me to get the website working for local use?
Yes and no, depending on what you are willing to do.
Is it still possible for me to get the website working for local use? No
If you have no database you will not have access to the Posts, Pages, Users, Options and all of the meta.
Is it still possible for me to get the website working for local use? Yes
If you create all of the database entries again to your satisfaction. You will still have all of the images you can re-upload to recreate the database entries for images. Then just re-create all of the pages and users as needed. Plugins may need to be disabled/reactivated/reinstalled and configured as well as your theme settings.
Try https://web.archive.org/ , you might be in luck there. Without sqldump its not much to do. If you had a cache plugin active, check if you have any snapshots.

Export all WordPress settings except for contents

I need to clone one of my WordPress websites with all databases and plugin settings in order to create a 1/1 copy of the whole theme, backend and functionalities except for contents. I don't want to export posts, pages, media files, comments and every other post type or so, but custom fields, posts database structure etc.
Are there any plugin to do this?
Or what queries do I have to run via SQL to do this?
Thanks
I've done many similar things, and honestly this would probably be the most time-efficient for you unless you have thousands of posts/pages or something.
Install BackUpWordPress and create a backup of all your files and the database.
Extract the sql file from that archive. Do a search/replace to swap out URLs if the domain name is changing. Then import it into your new database.
Upload the entire zip file onto your web server.
Extract it.
Manually delete all site content from the WordPress backend. Again, unless you have many thousands of posts and pages, this doesn't really take all that long. You can use screen options to display more than 10 or 20 pages/posts at a time for bulk deletion, but I wouldn't recommend going much higher than 100.
That's it! Sometimes brute force is the fastest way. Don't make things more complicated than they have to be.

How to create database and use it in wordpress dashboard

i am newbie to wordpress.I just created a free blog in Wordpress.I want to know how to create Database in it and use it. Any links to good tutorial will be great.Thanks in advance.
WordPress itself uses a MySQL database to store (among other things) post content and meta, users, info about plugins, etc.
In terms of creating a separate database from the one that's in WordPress itself, the question you're asking itself makes me very hesitant to think that you should. You'd be dealing with passwords, permissions, and a whole range of very easy to screw up settings that probably aren't worth playing with if you're new to WordPress.
If you wanted to use the database in WordPress itself and have the ability to write queries or create tables, you could look at any number of SQL plugins (eg http://wordpress.org/plugins/sql-executioner/ or https://wordpress.org/plugins/elisqlreports/) that would allow you to query tables in the WordPress database.... I don't recall if the existing plugins would allow you to create/modify tables, but phpMyAdmin or terminal would be just fine for that if not.
Since you're new, let me ***strongly*** encourage you not to modify/delete the default tables in WordPress, especially not on a live site.
Best of luck

Auto blog creation in a WordPress multisite environment

I'm looking for a way to have users register on a multisite setup and have a blog automatically created for them... no, not the way the standard ms registration system handles it. I want to get rid of the second step in the process completely. They register as 'user', and a blog is automatically created at http://my.site.com/user for them.
Followup question... anyone know of a way of automatically pruning the multisite platform? IE, users who don't login for 'x' timeframe (or after a certain time period has elapsed) automatically have their site deleted.
Just make one pure copy of Wordpress files and database layout just after wordpress instalation. When you will have it, after user complete registration just copy files from original directory like "_original_wordpress" to "username_dir", and create new database or just add tables with username_ prefix in them. Also you have to cofigure config.php or whatever there is in wordpress that contains database data.
As for 2nd problem - use CRON. Write script in PHP that lists all users who was last active before month ago, delete tables from database in MySQL and dir "/username/" and it's gone :) And so that it would be executed regulary, just put it in CRON like every day once?
Well thats just one of the way to solve any of your problems but it look very simple.

Managing Multiple Wordpress Sites

Not sure if this is the right place to ask, sorry if its not. I build a lot of Wordpress sites. My problem is, the number of them is getting big and harder to update them all when new releases come out.
I have written an app that will download the latest Wordpress release, and manually ftp the new files to all the clients, but this takes forever... need a new way.
I wanted to restructure this while I can or start a new process at least. Whats the best way to manage multiple Wordpress sites and keep them all updated? Some people have said 1 DB and modded config, others I have seen said to keep all installs separate and use plugins to automatically upgrade, but I don't know whats best to do. Ideas? Thanks :)
If these were all sites you managed on your own server, I'd recommend using a Multisite installation rather than separate instances of WordPress. This way you only have one set of themes, one set of plug-ins, and one copy of WordPress to maintain.
If these sites are on different servers (i.e. you're maintaining sites for clients remotely), I'd recommend you look in to a beta account with WP Remote. This is a service specifically built to allow you to remotely monitor and update multiple WordPress installations. It might be the best solution for you because it allows you to use the one-click update rather than manually downloading/FTP-ing the new files.
You can use this free self hosted app http://infinitewp.com
No limitation in number of sites being managed. You can update WP/plugin/themes, do backups, one click login to your WordPress admin panel.
EAMann is right, especially with the new Multi Site features in Wordpress 3.0, there is no better way to manage multiple sites under one umbrella. Being a developer myself, I know the pain of having to login to all those different accounts!
The way to set it up is create a "master domain name" that you will log into. Place this in your WP Config:
define('WP_ALLOW_MULTISITE', true);
Then login to your admin panel, navigate to TOOLS>Network.
After you've set everything up, copy/paste what it tells you to your HTAccess and WP Config file.
The next step, especially if you are putting clients on this network, is they will want their own domain name, not AIBot.com/theirname right? Thats where Domain Mapping comes in:
http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/
Check that out and good luck!
What you need is www.managewp.com it can do all of that for you plus a ton of other excellent features.

Resources