WordPress Export/Translate/Import Single Pages - wordpress

Back story:
My company has recently expanded into other countries and requires the site have multiple iterations with different translations and the user be redirected based on their geolocation. I manage our public facing website which is part of the marketing department (no other developers on the team but me). Our website is a custom WordPress template that I inherited, originally developed by a third-party agency. Our parent global company has a relationship with a company called Language Wire, who will take files of many formats and translate them by hand to ensure quality, and then return them translated. In this case they will accept .html and .xml files. Before we get into a workflow of sending and receiving files regularly, they wanted me to send them some test files which they will machine translate quickly and send back to me so we can make sure the workflow will be smooth.
Issues:
I did a WordPress export (which I've never done before) and I believe it exported our entire site in the form of an .xml file but I'm not sure what this file really is. Their machine translation translated a lot of dependencies that needed to remain in english which broke the file and disallowed me from importing back in but I'm assuming their agents who do manual translations will be able to navigate this better so I'm going to ask them to do a manual translation as a test. However, I'm wondering if there is a better way to export single pages or groups of single pages and then import them back in after translation without losing the template so I can send them a smaller file to manually translate.
Anyone have experience with this kind of situation? I'm also researching geolocation redirect plugins and have no idea how I'm going to organize the subdirectories of translated versions of our site. My main issue right now though is exporting and importing wordpress pages. Thanks!

Related

Import / Export comments on Wordpress site

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!

Wordpress migration to a new developed webpage

Case:
A old website developed with wordpress and run for serveral years.
Now, this wordpress website is giveup and will be re-developed to a new website which is not using wordpress anymore.
Old data i.e. article content, uploaded image file, members' info etc will be migrated to the new website.
Question:
1. Is it any tools for this type of migration?
2. If there is no tool for data transfer and I need to export the content from mysql, where can I get the article content in database?
3. Where can I find the uploaded file?
Data migration is always dependant on two things.
1. If your current framework/CMS can export the data you have, and
2. If the new framework/CMS can import data that you have just exported.
Since both frameworks are different, i.e. WordPress to any other CMS, your new CMS must be able to map the exported XML files. Which means, it must be able to customize the import process to tell what bits of data is Title, Content, Categories etc.
To answer your questions
Is it any tools for this type of migration?
Since you didn't mention what you new framework is, no one can really suggest a tool. Just google for "WordPress to YOUR-NEW-FRAMEWORK migraiton" and you'll get a number of tools. If the new framework is a custom PHP framework then I think you'll have to import the data manually or code an import script for it.
WordPress has a pretty good export tool. Check this page to learn how to export WordPress content.
Where can I find the uploaded file?
The uploaded files are referenced in the exported XML file, so at the time of import anywhere else, they can be fetched and downloaded if you can. Otherwise, you can find them in the uploads directory located at YOUR-SITE-ROOT/wp-content/uploads/
UPDATE:
As you are not targetting any framework/CMS but want to show the data with custom PHP, I'd suggest two methods.
Use the current database that WordPress is using and build your PHP script around it, benefiting from wp_posts and wp_postmeta tables.
A better way to go with this is using the WP REST API. This way, you keep the WordPress installation as is and still use it's data in your custom PHP site. Advantage of this method is that you won't have to bug your mind with scripting around database structures you have less information of.

Uploading unpermmited filetypes for virtual products on woocommerce

I would like to sell an eBook on my website. I'm using WordPress and the shop uses woo commerce, which I just switched over to.
The problem is, the eBook comes in a folder, which is not so simple to upload and sell. If I upload an .exe file, I get the message "Sorry, this file type is not permitted for security reasons" and there are certain files in the eBook folder which generate the same error.
I can use WinRAR or similar to compress it and then upload it that way, but I can't assume my users will have the technical ability to know what to do with it once downloaded.
The alternatives I came up with:
I have an install (.exe) file which is easy to download and use - it simply extracts everything and leaves shortcuts.
Ideally I would like to upload the entire folder and have the user be able to download the whole thing at once but, even if I could upload it, it doesn't seem possible to select an entire folder but only individual files - I would be really grateful if someone knew of a way to do this!
I'm yet to find a workable solution so any help would be much appreciated.
Edit: Should have added this is for interactive eBooks, not a simple pdf, unfortunately.
You are hitting WordPress' internal restrictions on file / mime types for adding anything to their Media Library.
This plugin should allow you to add .exe as a valid mime type.
https://wordpress.org/plugins/enhanced-media-library/
More details from the WordPress forum:
The underlying WordPress function called get_allowed_mime_types is used which is filterable and can be customized based on your needs via the WordPress provided filter named upload_mimes which is documented here: https://codex.wordpress.org/Plugin_API/Filter_Reference/upload_mimes
Thanks, WilltheWebMechanic. Your post helped me fix the issue without reverting to an older version of Woocommerce.
If anyone else is wary of the functions.php file like I am, you can use a plugin for it.
This is the one I used, and it seems nice and stable. Plus, it’s compatible with Woocommerce, which is why I chose it: https://wordpress.org/plugins/enhanced-media-library/
Once it’s installed, you can just add your file type to the ‘Mime’ section of the plugin.
I just added the file types I needed (epub and mobi). I hit save and my products are all working again.

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

wordpress, a download manager for outside URLs

I'm working on a online file library for one of my clients. It's a library for mostly PDFs and office documents. Because they are a huge amount(almost 2gb in files), I'm hosting them on another site(divshare), so that the hosting account we have doesn't get blocked by the excess of files, and also because of excess traffic downloading can generate.
So, my question is if there is a good download manager(even with some search for download categories and so) that can handle instead of local uploaded files, URLs of files hosted somewhere else?
The advice about any plugin or the like is very appreciated.
You ask how to code such manager, right? Otherwise, your are on the wrong site...
I think you need to make a kind of file manager, except that instead of generating HTML pages to view the files and act on them, it exposes a Web API, returning XML or Json data, that a WordPress plugin can manage.
From Divshare:
The DivShare Uploader Plugin for Wordpress replaces your regular
uploading frame with a DivShare upload form, allowing you to easily
upload and add files without ever leaving your "Write a Post" page.
It's a great way to speed up your blogging and take the load off your
servers when hosting big files and images.
It can be found here: http://www.divshare.com/integrate
Good Luck!
Marcelous

Resources