Create Multiple 200+ near identical wikis at once or faster

Hi,

I need to add 200+ new wikis that are almost identical. The only difference will be less than 5 characters on the title (a date in YYYYMM format) and a link inside the wiki.

Is there any way I can create all 200+ wikis at once, then I can edit each one for the minor changes?

Thanks in advance for your help.

Mary

  • Mary

    Hi,

    I was thinking about creating the wikis "externally' from WP, then 'importing' them into the SQL database. However, I am not sure what linkages are for the fields on a wiki page such as:
    Category
    Parent
    Footer
    Smart Crawl
    and Author.

    It wouldn't save me a lot of time if I have to go into each one of those 'duplicate' wikis once they are in WP and change the smartcrawl for just a MM or the YYYYMM unless I am making those changes 'externally' and then can change them before they are imported.

    I am thinking of either a DB editor program, or even creating a CSV file in Excel, if that would work. Using Excel and a CSV file, if it can be imported into WP in ALL the places the data needs to be, would be the easiest and fastest method. But, I am concerned with the other files (mentioned above) that are likely WP tables.

    Mary :slight_smile:

  • Mary

    HI,

    Excel is truncating the data. So using Excel is out. However, I opened the exported file (using the WP Export) using Notepad++. We had already loaded 25+ of these wikis (with only the date changed in the title , and the date change in SmartCrawl). Here is the content of one record from Notepad++:
    <item>
    <title>1993 12: SKYDIVING magazine</title>
    <link>http://skydiving-encyclopedia.com/wiki/skydiving/24-premium-content-premium-membership-required/24-3-premium-content-skydiving-magazines/1993-12-skydiving-magazine/</link>
    <pubDate>Fri, 13 May 2016 18:02:53 +0000</pubDate>
    <dc:creator><![CDATA[Pat_Works]]></dc:creator>
    <guid isPermaLink="false">http://skydiving-encyclopedia.com/?post_type=incsub_wiki&p=16076</guid>
    <description></description>
    <content:encoded><![CDATA[<h4 style="text-align: left;">by Mike Truffer
    courtesy of Sue Clifton</h4>
    <img class="aligncenter size-full wp-image-14880" src="http://skydiving-encyclopedia.com/wp-content/uploads/2016/04/SKYDIVING-header-logo.png" alt="SKYDIVING header logo" width="967" height="195" />]]></content:encoded>
    <excerpt:encoded><![CDATA[]]></excerpt:encoded>
    <wp:post_id>16076</wp:post_id>
    <wp:post_date><![CDATA[2016-05-13 11:02:53]]></wp:post_date>
    <wp:post_date_gmt><![CDATA[2016-05-13 18:02:53]]></wp:post_date_gmt>
    <wp:comment_status><![CDATA[open]]></wp:comment_status>
    <wp:ping_status><![CDATA[closed]]></wp:ping_status>
    <wp:post_name><![CDATA[1993-12-skydiving-magazine]]></wp:post_name>
    <wp:status><![CDATA[publish]]></wp:status>
    <wp:post_parent>13750</wp:post_parent>
    <wp:menu_order>0</wp:menu_order>
    <wp:post_type><![CDATA[incsub_wiki]]></wp:post_type>
    <wp:post_password><![CDATA[]]></wp:post_password>
    <wp:is_sticky>0</wp:is_sticky>
    <category domain="incsub_wiki_category" nicename="24-3-premium-content-skydiving-magazines"><![CDATA[24.3 PREMIUM CONTENT - SKYDIVING MAGAZINES]]></category>
    <wp:postmeta>
    <wp:meta_key><![CDATA[_edit_last]]></wp:meta_key>
    <wp:meta_value><![CDATA[101]]></wp:meta_value>
    </wp:postmeta>
    <wp:postmeta>
    <wp:meta_key><![CDATA[_wds_title]]></wp:meta_key>
    <wp:meta_value><![CDATA[1993 12: SKYDIVING magazine]]></wp:meta_value>
    </wp:postmeta>
    <wp:postmeta>
    <wp:meta_key><![CDATA[_wds_meta-robots-adv]]></wp:meta_key>
    <wp:meta_value><![CDATA[,,,]]></wp:meta_value>
    </wp:postmeta>
    <wp:postmeta>
    <wp:meta_key><![CDATA[_cs_replacements]]></wp:meta_key>
    <wp:meta_value><![CDATA[a:1:{s:9:"sidebar-1";s:5:"cs-24";}]]></wp:meta_value>
    </wp:postmeta>
    <wp:postmeta>
    <wp:meta_key><![CDATA[incsub_wiki_email_notification]]></wp:meta_key>
    <wp:meta_value><![CDATA[0]]></wp:meta_value>
    </wp:postmeta>
    </item>

    There are only a few fields that change from wiki to wiki. Those include the year and month in the title, the Post ID, the meta title, and the post date (time). The category, parent, sidebar, and all content of the wiki is identical (we have not loaded the link to these yet which will take the user to the correct filename to view.).

    SO, can I copy then paste, using Notepad++, all the contents from one record (item) change the title, meta, and leave the date/time the same? Also, is the next logical number the next Post ID?

    IF this works, then, will I need to delete my current wikis when I Import this corrected file, so I don't have duplicates of the over 1500 existing wikis? I think I recall this happening last May when we changed our site name and 'imported' all the existing data from our old site.

    Can you tell me where to find the data dictionary for the wp-posts file that WP creates, which should/may give me more info so I don't 'screw up'?

    Thanks,

    Mary :slight_smile:

    Really need some help here.

  • Adam Czajczyk

    Hello Mary,

    I hope you're well today and thank you for your question!

    Wikis are regular posts of "custom post type" (see here please) therefore your export/import (using WP Export/Import tools) way should work and you should be able to simply make these small changes in title using Notepad++.

    Can you tell me where to find the data dictionary for the wp-posts file that WP creates, which should/may give me more info so I don't 'screw up'?

    You may find more info on a post type data in two ways:

    - take a look at the "wiki.php" file that's located in the /wp-content/plugins/wiki folder on your server; around the line number 1703 the "register_post_type()" function starts and it shows exactly how the custom post type is set up

    - alternatively, you may use our CustomPress plugin on your site and it should show you the structure of Wikis post type as well, in a clean UI

    Can I create a Wiki Template that will already have all the same content, title, etc, in it which I can use to create wikis by just changing the YYYYMM in the title and smartcrawl?

    I think this would supplement the export/import way.

    If you have any further questions on this, let me know please!

    Best regards,
    Adam

  • Mary

    Adam,

    Hopefully last questions about this:
    1. Regarding the Post ID. Does WP assign it as the next logical number? For example: if the latest created wiki is 16500, will the next one be 16501, then 16502, etc? As I believe I MUST change the WIKI post number as well as the YYYYMM in the titles. Correct?

    2. My teenage son is helping me create these wikis. I think a template would be easier for him to use (and I REALLY don't want the wiki DB screwed up from a few missing special characters). However, I haven't found anything from WPMU Dev to create a template for creating wikis. Is there one? I REALLY prefer plugins you (WPMU Dev) make!

    3. Last question (I think). When I import the file back to my site, should I delete my old wp-post file so I don't get 1500+ duplicate entries? If this is true, I'll actually rename the 'old' one in cpanel, then import the new one. If it's OK, I'll delete the old file.

    Thank you again for your great support of the Wiki plugin! In my comment about your support, I said "I want to be Adam when I grow up (in WP) and support the Wiki plugin!".

    Mary :slight_smile:

  • Adam Czajczyk

    Hello Mary!

    Regarding the Post ID. Does WP assign it as the next logical number? For example: if the latest created wiki is 16500, will the next one be 16501, then 16502, etc? As I believe I MUST change the WIKI post number as well as the YYYYMM in the titles. Correct?

    It's a "yes and now". The ID is actually assigned by the database engine and although you're right about "next logical number" it doesn't mean that if the "first" wiki is e.g. 1000 the "next" one will be "1001". That's because the IDs are incremented by one for each content added that is a "post" in WP terminology. So it may be for example:

    - 1000 = "first" wiki
    - 1001 = some blog post
    - 1002 = other blog post
    - 1003 = "next" wiki and so on

    The ID while importing should be automatically updated. In other words, post IDs are not preserved during WP import. I would however suggest changing them just to make sure that they are different for each wiki so WP would consider these different content.

    2. My teenage son is helping me create these wikis. I think a template would be easier for him to use (and I REALLY don't want the wiki DB screwed up from a few missing special characters). However, I haven't found anything from WPMU Dev to create a template for creating wikis. Is there one? I REALLY prefer plugins you (WPMU Dev) make!

    Now I must admit I got a bit lost. So far we were discussing export/import feature and files. Could you please elaborate a bit on what do you man here by "template"?

    3. Last question (I think). When I import the file back to my site, should I delete my old wp-post file so I don't get 1500+ duplicate entries? If this is true, I'll actually rename the 'old' one in cpanel, then import the new one. If it's OK, I'll delete the old file.

    Again, I'm not sure to what file are you referring to. WP doesn't store any post data in a file, it's all stored in database and there should be no need to rename/delete anything.

    Having said that all, I would strongly suggest testing all this first on a development/staging site. Even a fresh WP install with Wiki plugin setup should do the trick here. The point is to make sure first that it all goes as it should and in case it didn't we should then be able to safely tweak/adjust the process.

    Thank you again for your great support of the Wiki plugin! In my comment about your support, I said "I want to be Adam when I grow up (in WP) and support the Wiki plugin!".

    Than you very much for you kind words. This is extremely nice of you and I'm really flattered! Let's however first start with a "dev" sites and then repeat on live site if it goes well. If anything goes wrong let me know please and I'll be happy to assist you further!

    Best regards,
    Adam

  • Mary

    Hi ADam,

    Regarding #2 about creating a Wiki template: After reading, on the WP blog, that templates can be created for things like ecommerce and member lists, I realized that when I hire young people to help add content to my WP site, IF I had a template for them to use, the number of errors should/would go down. If the template had all the fields they currently need to remember to use, like SmartCrawl, sidebar, parent, and author name, they wouldn't have to remember anything. Just click a dropdown for everything on the template.

    So is there a means to create a Wiki template?

    Thanks again, Adam, for your GREAT support!

    Mary :slight_smile:

  • Adam Czajczyk

    Hello Mary!

    Let me make sure we're on the same side here :slight_smile: What you're referring to would basically be a sort of a "form" that would speed-up/ease out wiki creation? Or do you mean some kind of a form that would help them edit/change those files to import?

    I'm sorry for asking so many questions but I got a feeling that we may be slightly "mixing terms" in this case and I'd like to make 100% sure before giving an (hopefully helpful) answer :slight_smile:

    Best regards,
    Adam

  • Mary

    Hi Adam,

    After looking at some templates, I'm not certain I have the technical ability to make one, then have it actually "create a wiki".

    When we create wikis, we always use the same fields. Here are what we always use:
    1. Title - always 65 characters or less (mandatory)

    Within wiki 'content' box:
    2. Author/creator/submitter - always in the same place, 1st line left justified, font H4 (mandatory)
    3. web site (if any) of author/creator/submitted - link to their site, if they have one, always left justified on 2nd line, below name of author/creator/submitter (optional)
    4. Repeat of title - centered on next line, font H1 (mandatory - identical to Title of Wiki)
    5. sub-title, if topic has one - centered under title, font H2, (optional)
    6. picture - usually centered, below title and sub-title if it exists (optional)
    7. content - usually left justified. Links may be embedded within content. (mandatory)
    8. Other pictures - may be left, center, or right justified, text wraps (optional)

    Other fields outside wiki 'content' box:
    9. Smartcrawl - repeat of title
    10. Author - from dropdown box
    11. Visibility - default is public. We do not change this from public.
    12. Category(s) - may be more than 1 applicable category. Some wikis have several/many. (mandatory)
    13. Wiki tags - fill in (optional)
    14. Parent - from dropdown (mandatory)
    15. Order - (optional)
    16. Sidebar - from dropdown (mandatory)

    I can "see" some of the code in my head. For example, once the title is written in a wiki title box, that same information is inserted into the template fields for the title, within the wiki 'content' box as well as the template field for Smartcrawl. I would have to define the location of the title within the wiki 'content' box. Same with the author/creator/contributor. For the subtitle, which is used but infrequently, IF the field is empty, THEN the first line of text in the content box below the title will move up one line.

    Am I going to have to write all this in html and use CSS? I am guessing that there isn't a "smart" template generator, from what I have read when searching for wiki templates.

    Of course I really don't know how to write the info to the correct fields for each affected file. Data dictionaries for the Add Wiki program, hopefully documented with affected files other than the DB, would be necessary to ensure all fields within the template are updating where necessary.

    That I have ever seen, I am not aware of structured programming data dictionaries for WP files, and full program documentation. PLEASE, let me know where they are or how to find them if they exist. I have written this type of work many years ago, when I was a mainframe programmer. But program documentation and data dictionaries were required in the environment I worked in back then. I have found few development environments these days where there is enough documentation for "the next guy" responsible for maintaining/changing/revising code to easily transition without a loooooong learning curve or without learning by pouring over the code to learn how it works. LOL.

    Let me know if I am attempting to "bite off more than I can chew", at my present level of WP competency.

    Thanks, in advance, Adam!

    Mary :slight_smile:

  • Predrag Dubajic

    Hi Mary,

    To include all the desired fields you will need to add it to template by using HTML and PHP and later style it using CSS.
    You can go to /wp-content/plugins/wiki/default-templates/ folder and copy incsub_wiki.php file from there to your theme (preferrably child theme) root folder and make desired changes to that file in order to create custom template with all the desired fields.

    Now, some of the fields are already included but some you will need to add yourself, you can either try with the WP custom fields or try creating new custom fields, perhaps something from here could help you with that:
    https://premium.wpmudev.org/blog/creating-content-custom-post-types/
    https://codex.wordpress.org/Custom_Fields

    If you're require additional help with custom developement you can post a job in our job board where you can hire a developer to assist further:
    http://premium.wpmudev.org/wpmu-jobs/
    Please note that, no WPMU official staff members are allowed to work in the job board.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.