Import / Export comments on Wordpress site - wordpress

A few months ago I created a staging Wordpress site to implement some changes on my website. The databases run on phpMyAdmin (although I'm not sure if this is relevant). I would like to save the comments (the ones that are already published and the ones I've received recently), so my plan is to save them as it follows:
Save all comments and disallowed IPs from the regular website. I believe this is done by downloading the Commentmeta and Comment databases, although I'm not 100% sure. Are there other relevant databases?
Import those comments to the staging site.
Export the whole staging site (databases and webspace) to the regular website and let it run all the updates.
If this isn't the right way to do it or you know a better / more effective / safer method I'd appreciate to know it.
I'm trying to locate the file in which the Comment Blacklist / Disallowed List of my website is stored. I don't use any comment plugins besides the Subscribe to Comments Reloaded, although I don't think this one would store the data I'm looking for.
I'm fairly new to web developing, but I'm not sure if this file should be on a specific database or on a certain folder of the webspace, so all insights are welcome and much appreciated!

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.

How to version control with WordPress

I want to set up a system where a developer can work on a separate server on a wordpress website.
My question is: If in the meantime changes are made to the live site (like plugin updates, new plugins, new posts, new comments, etc), how is one able to import a new feature (e.g. a new page) from the development server on the live site while making sure that previous changes on the live site don't get deleted?
I am looking to understand how this all works. In a sense, I would like to have some kind of version control system.
Thanks in advance :)
You can version control your own code using git. Basically we would init a new git repo and commit changes onto this repository. This can lie separately outside of the core files. i.e you only need to include the wp-content directory and ignore all the other core wordpress files.
Here is a good article on how to do a really good versioning system for a website.
http://toroid.org/git-website-howto
The posts and pages (basically content) in a wordpress site however lies in the database.Any changes made there will be permanent.
The only option is to keep taking regular backups of the content. You can do this by using an automated backup tool.
If you really want to version control your database, here is an article that helps:
https://blog.codinghorror.com/get-your-database-under-version-control/
This one is a tricky one. You cant host a single website on two servers. Just imagine a website having 2 hosted urls..!! No way.. You can never do that.
You better create a new user and give access to him. Look carefully in the settings and be a admin. You will have a chance to approve or reject what the second user changes.
Hope this helps.

How to keep backup or save latest WordPress build in Github

I am making a WordPress website and I might create new builds. How will I keep back up or save my latest builds, I would prefer to use and manage builds through github. Is there a particular way that I can do it in WordPress?
Simple way to install this plugin and create your WordPress backup and download it :
https://wordpress.org/plugins/duplicator/
I used gitwatch to automatically commit new code to a Github repository. This included new uploads and new plugins. Just follow the ReadMe and it works pretty well.
This is an example of a website where I used this technique.
Words of Caution
Use .gitignore to exclude your wp-config.php file so that database credentials etc are not stored to github.
Be careful not to dump your database to the wordpress directly (which
would automatically commit it to Github).
Be careful of plugins
that write sensitive stuff to a file that might get committed.
I am aware of Kerchoff's law, or not attempting security through
obscurity, but I am not stupid about the risks of automatically
publishing all of your configuration publicly. The site above is not
a high profile complex site (and I generally like to think I know
what I'm doing). DO NOT do this at home if your website is handling
sensitive information or could be at risk of anything more targeted
than a general Wordpress security flaw dragnet on Google.
One partial solution to these concerns would be to just make the Git repository private.
Finally if you are dealing with European data you need to comply with GDPR
which means you need to be ready to scrub a file from Git history
using something like BFG
You are addressing two different things. For backups, there are WordPress backup plugins that you can use like updraft (here's the link: https://wordpress.org/plugins/updraftplus/). But when it comes to development workflow then GitHub is the right platform. If you want to know how to work in a live environment and how to push and pull the latest changes from local to live or vice versa
(to keep track) then this guide will help you. https://www.cloudways.com/blog/wordpress-github/

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

How to move site from Adobe Business Catalyst to Wordpress

I have a site that I has been created in Adobe Business Catalyst. I am not a fan of this CMS. I am looking to change it to a WordPress site. Is there any easy way to do this? Is there any kind of conversion software or service? I want to keep all the file names and redirects, etc the same.
One of my clients wanted to leave Business Catalyst and merge it with a Wordpress.com blog. The way I got around Adobe's lack of export was as follows;
I used my Linux Server to pull everything off the Adobe Servers using
wget --mirror -p --convert-links -P ./Local/Dir Website-ULR
Tutorial Here, Number 10
All the HTML files came down without any extensions so;
I copied the directory to my Mac and used Fork Lift to batch rename the files to add .html - though any renaming software will do.
The import tool for Wordpress needs an index file to find all your pages so I needed to make an index.html page with links to every post so;
I copied them back to the Linux machine and used
tree -H baseHREF ./Local/Dir
depending on OS you may need to download the tree package or similar.
This then generated an onscreen HTML file in the Terminal Window so;
I copied the HTML code it created and put it into Dreamweaver with the rest of the site, though any software will do, to run a batch clean up of the links.
As Wordpress.com doesn't allow you to install plugins I needed to put it on a my local installation of Wordpress to do the import.
I then used the Import HTML 2 plugin to get the pages into my local Wordpress installation
As I was moving the files to a Wordpress.com site;
Export from from my Wordpress and import into their blog.
I hope this helps anyone, in total it took me 12 hours to find all the tools I needed and to work out all the steps I needed. If i needed to do it again it would take up to an hour now I know how to do it.
I had more links in the post but as I'm new to the forum I was only allow 2.
Better people than I might be able tell you a quicker way to do this.
The only things that can be "exported" in Business Catalyst are E-commerce products and Web App items - they can be exported as .CSV files. You can then hire a programmer to convert them over to a format that works with Wordpress.
Exporting blogs from the Business Catalyst blog module is tricky - one way to do it is to enable RSS and copy the RSS feed and open it in excel to save it as a .CSV or .TAB file where you may be able to import the blogs or get a programmer to convert it into soomething Wordpress compatible.
Thank you for taking time to better explain your platform to me.
In the way of an answer, I recommend the following:
Export your current web site details into a csv file using Screaming Frog.
Then use the CVS Importer WordPress Plugin
This is working for me. I would still be pleased to hear if others have found a process that they also find suitable.

Resources