PluginProbe
Snippet Shortcodes / 4.1
Snippet Shortcodes v4.1
5.2.1 5.2 5.1.8 5.1.6 5.1.7 5.1.5 trunk 1.0 1.1 1.2 1.3 1.3.1 1.4 1.5 1.5.1 1.6 1.6.1 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.8 2.0 2.0.1 All 74 releases
shortcode-variables / docs / csv-import.md

csv-import.md in Snippet Shortcodes 4.1, at docs/csv-import.md

49 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # Import shortcodes via CSV
2
3 > The following feature is only available in the [](https://shop.yeken.uk/product/shortcode-variables/Premium](https://shop.yeken.uk/product/shortcode-variables/](https://shop.yeken.uk/product/shortcode-variables/) version of the plugin.
4
5 Rather than manually add shortcodes to your [shortcode collection]({{ site.baseurl }}/shortcodes-own.html), Snippet Shortcodes has a CSV import tool which allows you to bulk import shortcodes.
6
7 **Note:** Depending on your server, you may need to split larger CSV files into smaller, more manageable sizes for performance reasons. As a guide, we'd recommend processing no more than 500 rows at a time.
8
9 ### CSV Format
10
11 A CSV file must adhere to the following rules:
12
13 - Have a header row with the following headers:
14
15 ```
16 slug,content,global,enabled
17 ```
18
19 *Note: The column "content" is required however, the data for each row can be left blank if not required.*
20
21 - Have one or more data rows.
22 - For each row, ensure the following are met:
23 - Has a "slug" that is 100 characters or less.
24 - Ideally have a value for "content" - otherwise you're importing a blank column.
25 - A value of "yes", "no", "true" or "false" for "global".
26 - A value of "yes", "no", "true" or "false" for "enabled".
27
28 **Note:** If the import finds the above rules haven't been met, then the row will either be skipped or fail.
29
30 #### A simple CSV example
31
32 ```
33 slug,content,global,enabled
34 business-development,Robust background support,false,false
35 human-resources,Stand-alone regional encoding,false,true
36 legal,Automated needs-based utilisation,false,false
37 support,Our support team is located in Canada,false,false
38 ...
39 ```
40
41 ### Importing a CSV file
42
43 - Via the WordPress Admin menu, navigate to "Snippet Shortcodes" > "Import Shortcodes".
44 - Using the button labelled "Select CSV", choose a CSV file already uploaded into your Media Library or upload a new one from your computer.
45 - Examine the output report and action any errors.
46
47 #### Dry run mode
48
49 If selected, dry run mode will run basic tests against each row without attempting to update the database. We recommend you do this before performing an import as it gives the opportunity to correct any issues before attempting the main import.