Backing up in WordPress

So I have been doing this blog for now 2 years, wow time flies, and I have been doing regular backups, and all of them manually.  So I open up my host’s cpanel and downloaded the database backups, then I would go to the each site’s wp-admin and created an xml file.  Sometimes I would also do a backup of the child-themes I’m using.  I have gotten quite fast at it even, probably 15 minutes max, if the connection is fast.

A few days back I started to think, there has to be a better way.  I saw several options, but were paid.  I really didn’t want to pay another $5/month for something that I could do for 15min every week; then I saw an article on wpbegginer.com – How to Create a Complete WordPress Backup for Free with BackWPup So today, I gave it a go  I tried it with the smallest installation I had, 10 minutes later I had configured and ran the backup.  I moved to the other sites, and I had it.  So try out BackWPup.

I backup the database, the child-theme & the xml export, every week to my Dropbox; just like I did before, but now I don’t spend 15 minutes everyweek, plus it always happens.  I just get an email telling me that it went through.  I wasted 26 hours doing this for the past 2 years, in 15 minutes I’m set for the future.

 

How To Document a Family Vacation

I love to write about my experiences, show how to do the things that I’ve learned.  To give freely of my knowledge, even if only 1 person actually reads this blog.

I’ve been working on catching up on the summer of 2012, I did an internship that summer and although we had a lot of pictures, we didn’t post them anywhere.  I started the family blog over a year ago, and I never intended to do retro posts, I felt that we should document that time.

I wanted to find ways to document our vacations on a blog post.  There is a lot of thing on family vacations, but there were no tips how to write a post about your vaction, how to convert hundreds of images into a good post.  So this is my atempt at that.

Begin with the End in Mind

ImagesYes, cliché, but so very true.  Gather all the images into one place: all your DSLR images, the ones you took with your phone, ask relatives if they have images, videos, etc.  Put everything in one place and look at them once over.  What is the feeling you want to transmit on that post.  I write one word themes: excitement, fun, sun, bright, awe, etc.  That is the feeling that will guide you throughout the post.  Your goal will be to have your readers feel that.

I will use this post on our trip to Saint Louis as an example. I chose to have my readers feel small, because that is how we felt when were were at the monument.

Select the Images with Purpose

This is always the harderst thing for me, for this trip to the Saint Louis Arch I had over 200 images.  How was I ever to going to reduce that number to a handful of images to use.  I normally make a copy of my images and I start deleting, I do multiple passes, this is sort of the way I do it:
twoImages

  1. Any images that are just bad, blurry or empty
  2. Remove some duplicates, there will be pictures of the same thing in different angles, I remove most of the duplicates leave a few for further consideration
  3. Images that don’t convey your theme, I’m not saying to remove everything, just think about your theme and remove some more.

I’m able to remove around 50% of the images using the previous 3 steps.  There will always be images that you fall in love with, so make sure you keep those.  There will be a time when you will have to make a decision, but right now just reduce your images to a manageble set.

Design the Flow

By this point I get sick of just looking at pictures and videos.  Most of the time I feel overwhelmed and think that I will never be able to write a post that is not 2000 words long that not even my family would want to read.  So I leave that behind and start thinking of the flow.

DSCN4022I use blank paper and I start drawing headings and boxes.  I first think about what I want to write about, which experiences make sense.  What emotions did I feel during the trip and how will they all fit together.  I think of my audience, mostly my family, if we were gathered together what do I want to tell them.  One thing I always tell myself is: “You are not making a documentary on the place.”  I don’t want to be just showing images of building and exhibits, I want to document my family, and the emotions we’ve felt in those places.  Yes there will be images of buildings, but they should make us remember those feelings.

Depending on the length of the post I will write 3-4 headings.  For the Arch post I settled on 4 headings: the museum, the math behind the arch, being at the top, and our return trip.  On my piece of paper I put down the heading, and put some boxes with images that I thougth would be good.  I wanted to put 2 images side by side, on for the east side of the monument and another for the west side.  I wanted an image of the “elevators.” I also think of what I call, obligatory picture, you know the one that shows the name of the place with your whole family in from.  Yes, the Disney Land Mickey Mouse garden in the entrance of the park.  So in a few places I just write, oblig, to make me look for an image that would be that, THE images for that section.

I also represent with smaller squares images that I think will be good to give context or to tell part of the story, but if people skip them I’m fine.  WordPress uses galleries, and I use galleries in different ways on my posts, but those smaller boxes are the galleries.  I use 3 column galleries to most of the time I think of how many images I want to add to a certain sections in increments of 3 (3, 6,9, etc).

Back to the Images

Having a good grasp of what I need to do, I go back to the images and it becomes a lot easier to find the images I want to use.  There are times when I know I need 5 images and I still have 30, I create a new folder, put the 30 images inside and start deleting more images.  Sometimes I have to do the oposite, I have to look at all the images and think of 3 that I HAVE to keep, so I move those to the new folder, that eases the process.

resolutionMany, many times I know I will need 5 and I end up with 10 in the set, and I’m fine.  I start editing process, I use GIMP for the post processing.  I’ve found that at this point there are images that I thougth that were amazing, and then looking at them in a post production state, they aren’t really that good.  Or I thougth I could straighten them, but then they don’t work out. So it is good to keep a few extras on hand.  I reduce the resolution to about 2048px x 1536px; it is still HD, but not too big.  WordPress creates lower resolution copies for various applications, so that makes it even easier.

Start Building Your Post

Preliminari01At this point is where I start putting my blog post together.  Begin by getting some sample text to help me see what it’s going to look like.  I use lipsum.com to get dummy text, it helps me picture inside the post what the final product will look.

I then start adding the images to the sample text, I use my paper flow to guide what I’m putting where.  Not 100% strict, some images looke better in one way rather than another.

You are done with images.

Start Writing

Once I know how the post is going to look like, and I see the images and I start remembering the events, all the emotions come back.  I then convey those emotions and memories in the text.  Some explanations takes long paragraphs, some take a caption on an image.

I picture my family (my audience) waiting for me to tell them about our vacation.  I think of my daughter going back in time and reading about the time she walked, or rode a bike.  I want her to see those images, but also remember those stories.  I write to her, I write to make those memories last longer.

This is not how I would write a post like this one, but this is how I write a post about our family.

This is the result, from a bird’s eye view:

finalProduct

 

Translate a WordPress Blog

For my family blog, I decided to fully convert it to Spanish.  We had been primarily posting in Spanish, but most of the descriptions were in English.  The primary reason for doing the blog in Spanish was so that we could have a connection with our family in Guatemala, and although many do speak English, Spanish is still the best way to communicate with them.  Although I did not do all these changes in the order that I present them here, now that I have given more thought to the process I think this is the best way to do it.

WordPress in Your Language

From the WordPress help:

Although WordPress displays in U.S. English (en_US) by default, the software has the built-in capability to be used in any language. The WordPress community has already translated WordPress into many languages, and there are themes, translation files and support available in many other languages. It is also possible to create a multilingual blog with the help of Plugins.

It is fairly simple to change the language for the installation of your WordPress instance.  You can find a list of languages in the codex site, the list will live here soon. For now, go here.  Since I wanted the Spanish translation, I started at es.wordpress.com, but the instructions are always the same:

  • Download the .mo language file for your language.
  • On your site server, create a new folder in your /wp-content directory called /languages
  • Upload the .mo file to the languages folder you just created.
  • Open your wp-config.php file in a text editor and search for:
define ('WPLANG', '');
  • Edit this line according to the .mo file you’ve just downloaded, e.g. I wanted the Spanish language so I added:
define ('WPLANG', 'es_ES');
  • Once you’ve added your language code, save the file.
  • Upload the modified wp-config.php file into the WordPress root directory.
  • Open your browser and go to your WordPress site. It should now display in the newly-installed language.

A Theme with Internationalization

Now that your installation is in the language that you desire, you can change the language on your theme, this is can be as easy as your main installation or downright impossible; this because you depend on the theme’s creator to allow internationalization.  I believe that the all default themes come ready for multiple languages, for others it really is hit or miss.  I had chosen Pinboard because it offered internationalization.

What does it mean to offer internationalization

You can find a lot of information in the wiki entry, but in short for a theme to offer internationalization, or as commonly written i18n (where 18 stands for the number of letters between the first i and last n in internationalization), they need to provide a template.

Pinboard provides a template file called pinboard.pot, which contains a list of all the translatable strings extracted from the sources.  The .pot files looks something like this:

 #. TRANSLATORS: Please leave %s as it is
 #. Thank you for contributing to this project.
 #: src/name.c:36
 msgid "My name is %s.\n"
 msgstr ""

Translating the theme

Search for other people that have translated the theme, you should be looking for a file name like themename-locale.mo or themename-locale.po (ie pinboard-es_ES.mo).  I couldn’t fin any translations on the support forums or on searches, I had to do it by myself.

In short you need to rename the .pot file into a .po file and add all the translations on the messages.  You can find all about it here, but there are easier ways.

LocoI used the web service Loco, which offers a very easy interface to load the .pot file, translate each message and then download the .mo file. From their about page: “Loco helps you manage and integrate translations into your software, whatever you’re building.”

Folder Tree
Folder Tree

I renamed the file as pinboard-es_ES.mo and then uploaded it to the correct folder.  This is in a subfolder where you placed the wordpress language file.

Folder Content
Folder Content

By this point you should be able to see your site in the language of your choosing.  I love looking now at my blog and just seeing that I made it happen.

Compare

Changing the Language in Your Posts

There are several ways to do this, you can learn about them here.  I considered these 3:

  1. Translate each post
  2. Create separate posts for different audiences
  3. Use a service to translate

Although I would have full control over the content on options 1 and 2; the burden was so big that I couldn’t do it.  I tried a few services and settled on Google’s Translation services.  Here are the steps I used to add this service to my blog.

Go to translate.google.com

GoogleTranslateSelect Website Translator

GoogleTranslate2Then click on “Add new website”

GoogleTranslate3Add your site, the original language and the languages you want to have available

GoogleTranslate4Pick the way that you want your dropdown bar to look and see if any of the Advance features apply.  I use Google Analytics so I wanted to track this.  If none of them make sense to you, leave them unchecked.  Now click on “Get Code”

GoogleTranslate5This code needs to be inserted in two places for it to work on your wordpress site.  This is where it becomes less easy, if you see the instructions as being too complicated you can try this plugin “Google Language Translator” it looks simple to use and has very good ratings

First you will need to find your theme’s functions.php and edit it.  You can find it in the Appearance editor.  Then add the following code:


if ( ! function_exists('mijangos_google_translate')):
/***
Adds Meta tag to header
*/
function mijangos_google_translate() {
echo '<meta name="google-translate-customization" content="XXXXXXXX-XXXXXXX-g4a2bfd921f7edf6c-f"></meta>'."\n";
}

add_action('wp_head', 'mijangos_google_translate');

endif;

Notice that the part after echo ' is from the code being generated, and don’t forget to end it with ' ;.  This functions puts this code in the header.  Now click on “Save File.”

Edit the single.php page, this is the page that generates your posts.  I wanted the language selector to be just above the post content.  I located that part and put the following code in.


<!-- Google Translate -->
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'es', includedLanguages: 'en,fr,pt,ru', gaTrack: true, gaId: 'UA-37421093-1'}, 'google_translate_element');
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<!-- Google Translate -->

<div style="margin: auto;">
<div id="google_translate_element"></div>

Save the file and go to a post. This was my result.

GoogleTranslate6