Export all WordPress settings except for contents - wordpress

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.

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.

Using same database for multiple wordpress websites

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.

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

Why does Wordpress have such an awkward media migration experience?

I've had to migrate many Wordpress web sites from different domains on the same server to different domains on different servers. In few cases, a simple export was sufficient. In many cases, an import failed to load the media correctly and I was forced to use a common work around.
Workaround (for those wondering):
I download from the original site and upload to the new site the uploads folder where my media is stored via FTP. Once this transfer is complete, I use the plugin Add From Server to select each individual image, one directory at a time.
This is the best workaround I've found, but it's hardly efficient. It's incredibly time consuming and stressful on your bandwidth.
If you have any better suggestions, I'm all ears. But primarily, I want to know the "Why" to this question. What causes Wordpress to have such a hard time managing media migration while migrating posts, pages, and users are much less of a headache?
There is an excellent tool that certainly eases Wordpress migration WordPress (and others) Search and Replace Tool. With that tool it's easy to search through the entire database for all occurrences of old domain, and replace that with the name of new domain. After replacement all the pictures and widgets should work properly.
The way I'm moving WordPress:
export and import the database with phpMyAdmin
transfer the files with FTP program like FileZilla
edit the wp-config.php settings for a new domain
search and replace on the database with InterconnectIT Search and
Replace Tool

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.

Resources