The Fun and games of attempting to migrate Instagram data continue. I have now spent several days on the task. I have my Instagram posts currently sitting on a local blog. The challenge has been to migrate it from my local WordPress installation to the main website.
After dozens of failed attempts the SQL database, seperate from this blog’s database was getting filled with lines of data. I was up to over 31,000 pieces of data or more. I didn’t check the term a plugin uses.
From my experience of playing with JSON files they are dealt with differently by each app you use to convert them, so what works in one instance, fails in another. This is true of JSON to XML and JSON to CVS conversion.
I went to PHPMyAdmin and purged two tables and now I’m back to having a blank slate. I cleared both the media and the post tables. I also emptied the uploads folder. I feel optimistic that my next attempt will be successful.
For a while, I have been thinking about creating my own WordPress themes, but I didn’t know where to start or how many hours it would take. I always assumed that it would take many hours and that I would have to create templates, style sheets and more for a number of pages. In reality, you need an index.php page and a stylesheet. Anything else is a bonus.
A shortcut is to find a theme that you like and to see which fields you want to modify and just modify that behaviour. Choosing to use another font requires one or two lines of code. With minimal effort, you can personalise a theme.
The course I watched is “WordPress: Building Child Themes” and within two hours you will see how to use CSS, functions and templates to change one or more aspects, using the themes that you select. Personalising your own theme, can take seconds rather than hours.
It also gives you an opportunity to learn with a small challenge, and as you grow more confident you can try more and more ambitious projects.
What I would like to do is find a way to create themes by subject for pages so that I can make my website fully dynamic, and bring the static pages into the 21st century. This will require some trial and error, hence the value in playing and experimenting, until it works.
Recently I migrated my photos from Instagram to a WordPress blog. The process took some trial and error. The first step is to understand how to read JSON files and format them in a way that WordPress can use. The next step is to import that data into Wordpress.
To request your data follow this link, request the data and wait for an e-mail telling you that the files are ready to download. When the files are ready to download download them and unzip the files.
Convert from JSON to CSV
You will find photo directories listed by year and month. You will also get a few JSON files but the ones you want are the media.json files. With a tool like the Konbert app you can convert the files from JSON to CSV files. When the CSV file or files are ready open them in Google Sheets or other spreadsheet software and look at the columns.
The fields you will find are
Caption
Taken At
Location
Path
Stories
Videos
Photos
Although not essential you can add fields like author. If you see “stories” and “videos” remove these columns. The CSV importer plugin I used cannot import videos and stories automatically.
When this is done you should have a CSV file that has caption, taken at, location, and path. Keep the photo file structure as it is.
Installing WordPress Locally
The simplest Wordpress installation I found is Local. Within minutes you can have a wordpress blog setup and running on your local machine. The reason you want a local install is that JSON to CSV conversions can be messy so if you make a mistake it is easy to reset and start again.
It took several attempts before I managed to import all the images and get them to display properly. If I had imported those files to my production Wordpress Blog I would have spent hours deleting thousands of posts more than once.
Folder Structure
When you import your images to WordPress with the CSV importer tool you have the option of leaving them where they are or of importing them into the uploads/year/month folder structure. Be warned that if you let the importer tool import the images itself it will import all of the images and generate thumbnails. If you have 3900 images you will end up with 12,000 images in a single folder as thumbnails are generated.
I would recommend:
creating a folder for every year that you were on Instagram
renaming every Instagram folder from /yearmonth/ to month, for example from 202006 to /06/ in the 2020 folder.
placing each month in the appropriate year/month folder in uploads.
Preparing the CSV file.
For the next step, I would recommend saving a copy of the document as it is so that you can go back to it if you make a mistake.
If you have changed all of the yearmonth folders to a year/month/ folder structure then you can use find and replace to update the folder names. You can find and replace 202006 with 2020/06 and work recursively. This will take more time, but be tidier. The CSV importer tool does not keep imports tidy. If I had known this ahead of time I would have taken this additional step.
In the CSV file the path is relative. To be tidy I put the photo folders in /wp-content/uploads/photos/ and had to update the CSV document to reflect that. Although you can find and replace in Google Sheets I used Visual Studio code for the next step.
Originally the path will be something like photos/202006/filename.jpg. but as the images are in wp-content/uploads/photos WordPress will look in the wrong place. With Find and Replace I selected “/photos/” and replaced it with “http://localhost:10003/wp-content/uploads/photos/”. At this point, the CSV files were ready to be imported.
If the CSV file is prepared correctly you should see Caption, Taken at, Location and Path. When I imported I mapped it so that so that Title and Content and slug would be the caption and for slug to be the caption. I then mapped Taken On to Publish date and featured image to the image path.
If you have kept the image folders as they were when you unzipped the Instagram download then select “Use media images if already available” and “download post content external images to media.” The images will be copied from the photos folder into the correct folder for WordPress to use.
If you have already organised your images by year and month in the uploads folder then you do not need to check “download external images to your media as they are already there.
The Final Step
The Final Step is to find a theme that reflects how you. want your images to be displayed and share the new location of your photo library to your various social media profiles and networks.
As a final step if you find that an image does not load for single posts you can add this line of code after the PHP tag.
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
the_post_thumbnail( 'full' );
}
This is a lot faster than going through 3900 posts and adding an image to each individual post.
Conclusion
If everything works as expected you can now export a CSV file of your test blog and upload it and the appropriate files to your online photo blog.
On at least three occasions toots that were written as a cry for empathy, or at least venting, were interacted with by apathetic people. For this simple reason I deleted two Fediverse accounts. I deleted my Mastodon.social account, and my FireFish.social accounts. I have a precise desire, when using social media. That desire is to find a community of likeminded individuals that I have such enjoyable conversations with, that I want to meet them in person.
Noise Pollution
Noise pollution is caused by apathetic people, people that don’t consider that people want to sleep, study, think or other things. If noise pollution was not a problem libraries and other places of learning would not require quiet. They would be as noisy as everywhere else.
For daring to complain about noise pollution I was insulted, and then mocked on mastodon.social. When I look to vent, or, ideally, find empathy, and I find apathy my instant desire is to tell the person to duck off. I didn’t. I decided to write one more toot. The second response encouraged me to block the apathetic individual.
The Cult of Personality
I don’t remember what a second person wrote but it encouraged me to speak about normal people as sheeple, and to speak about the benefits of tight knit communities. One individual denounced the term sheeple and then wrote some rubbish about how not all accounts with a million followers are bad. I considered responding but didn’t. Why fight an uphill battle.
The Trigger
The trigger that got me to delete my mastodon.social and firefish.social posts was an ironic “I’m happy for you”. I am almost certain that it was ironic, although due to a lack of emoticons I do not know this for certain. What I do know is that I dumped Facebook early in the pandemic because of such interactions.
The Options
Give Up on Social Media
Sometimes I feel like giving up on asocial media. I feel like giving up on asocial media because the space is shared between generations, and use cases. Some people are utilitarian broadcasts, whose only desire is to find a mass audience. The second group are trolls looking for a misunderstanding, rather than a conversation, and the third group The third group are people, like me, who want to converse, but have to spend weeks or months finding pleasant conversations.
That’s why it’s tempting to give up on social media. It takes so much time and yet it’s so fragile. I’m thinking of returning to Facebook and Twitter because of how bad Mastodon is at the moment.
The Fediverse and Blogging
I wrote Mastodon above, because although I feel that Mastodon is a waste of time, due to how easy it is to be trolled, but very difficult to find empathy, it feels like working with WordPress and other Fediverse compatible instances is an interesting playground to play in. I love that my blog is somewhere so visible now. It is no longer stuck in a desert, it is at the front of my Fediverse streams, when i like and share my blog posts. I feel that this is the Fediverse’s unique selling point.
Revert to Facebook and Twitter
The reason for leaving Twitter and Facebook is/was to leave a toxic environment and look for a healthier community where it is fun to invest time and attention. With my experience of Mastodon, in particular, I feel that staying away makes sense, especially from big instances. The experiences we left Twitter and Facebook to avoid, are present on Mastodon.social.
Stay on Small Instances
The other, more rational option is to stay on smaller instances, and just wait until communities form. It might take months or years, but eventually they might arrive. This will take time.
Use a Nickname
Another option would be to use the web anonymously, using a nickname, like so many people do, to avoid trolls having an effect on your official persona. It’s the rational choice, but a social network where you have to hide behind an avatar is less interesting than one where people use their actual names.
And Finally
Although Mastodon and the Fediverse are growing both places are still filled with solitude. We can devote hours a day, to try to find engagement, or we can take a break, write a blog post that is shared to the Fediverse, and let it do the talking.
Today twitter has reminded me of why I dislike how it’s managed. With the big Mac World event and CES twitter is down, for the count. The problem is that these crafty people have decided that rather than take the site down completely they would let it lag.
As a consequence of this lag the site has been rendered redundant but don’t worry. Other sites like plurk, friendfeed and facebook are still standing.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behaviour or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.