Category: blog

Import 50000 tags used on Stack Overflow to WordPress

This site contains different domain knowledge so if I can label my process documentation it will make it easier for others to find. Then I find out Stack Overflow, the largest question and answer site for IT professionals, provide Data Explorer to get all the Tags used on Stack Overflow.

Below are the steps to import these tags into own WordPress:

  • If you use CloudFlare or similar service, turn it off first. Otherwise, it will cause Error 524 (A timeout occurred)
  • Turn the tags list into XML format, you don’t have to add wp:term_id and wp:tag_slug . The result will be like this
<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/" xmlns:content="http://purl.org/rss/1.0/modules/content/"xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wp="http://wordpress.org/export/1.2/">
<channel>
<wp:wxr_version>1.2</wp:wxr_version>
<wp:tag>
<wp:tag_name><![CDATA[javascript]]</wp:tag_name>
</wp:tag>
<wp:tag>
<wp:tag_name><![CDATA[java]]></wp:tag_name>
</wp:tag>
</channel>
</rss>
  • Change the php_value max_execution_time to a longer number since it cause few hours to import 50000 tags, for me I set it to 6 hours (6 hours * 60 * 60 = 21600 sec ). Edit .htaccess in the project and append this line
max_execution_time = 21600
  • Go to WordPress -> Tools -> Import -> WordPress Run Importer. Make sure the maximum size above 3.72 MB. If you haven’t edit .htaccess in the project youcan append this line. 10M would be enough.
php_value upload_max_filesize = 10M
  • Import it, the page will keep refresh util it’s done.
  • Import is done, add a post and select tags.

29/3/2019

I fix the “Sorry, this file type is not permitted for security reasons” issue when I trying to upload the Stackoverflow tags file so you don’t need to do the formatting and can import all the tags. A lazy way for you guys 🙂

You can run the CSV Importer and the CSV file then you are good to go

IT Daily Documentation – why need this?

For programmers like me face a lot of bugs or something that had a lot of steps and took a long time. Sometimes you have to do it again three months later. And at that moment you completely forgot everything you did.

After I certified with Google IT Support Professional Certificate, I found that it’s so important to document the work you do. Documentation might seem like a time suck, but it’s a total time saver.

This website mainly stores my IT documentation, and you also read my document to figure out what you need to do to fix the problem.

The documentation format based on the Process Documentation video on Technical Support Fundamentals course-

  • Title
  • Tag(s) related to the problem
  • Clear problem statement
  • Background information
  • Exact instruction on how to fix the issue (1. … 2. …)

I try my best to follow the content structure but sometimes the problem & solution too simple so there will only have Title and Solution.

Close Bitnami banner
Bitnami