Owncloud Nine: How to reset the admin password

Well, about ten minutes after installing the new Owncloud Nine we found out that we had typo’d the admin password. Fortunately, it’s an easy fix. Run the following (this worked on Debian with a fresh Owncloud 9 install):  
cd /path/to/owncloud sudo -u webserveruser php occ user:resetpassword adminaccountname
  In our case the command was:  
cd /var/www/cloud sudo -u www-data php occ user:resetpassword admin
  It should prompt you for your password twice:  
Owncloud Nine - How to reset the admin password
Owncloud Nine – How to reset the admin password
  Assuming there are no more typos, that’s all done!

Adding products to Woocommerce

First, log into your website at:  
  Enter your username and password and you should be directed to your WordPress dashboard.   First, we’ll upload some images to go with the products you’re adding today. On the left you will see Media:   Screen-Shot-2016-03-04-at-10.02.25-AM Hover over it and you should see “Library” and “Add New”:   Screen Shot 2016-03-04 at 10.03.51 AMClick “Add New”.   Screen Shot 2016-03-04 at 10.04.21 AM Drag and drop some files in, or click “Select Files” and choose them from your file system. You will see the progress bars for each file below the selection area. Once all of the relevant media files are uploaded, look on the left for “Products” – hover over it and you should see “Add Product”:   Screen Shot 2016-03-04 at 10.06.09 AM Click on that, and you’ll unsurprisingly be taken to the “New Product” screen.   Screen Shot 2016-03-04 at 10.06.41 AM Here you can add the product name, choose the category it should appear in – you can pick multiple categories – and add the contents for the product page, including additional photos/videos. Add the text in the blank white box on the lower left, and add images/video/etc. with the “Add Media” button. Scrolling down you should see some more info you need to add:   Screen-Shot-2016-03-04-at-10.07.42-AM Most of it is self-explanatory – you’ll need to set a product image that appears in the search results and category views, and click on the various tabs in the area with the red rectangle around it to add the various info there.   Once you have done that, head back up to the top and click “Publish” to make the product live!  

Checking whether nginx cache is working

Just set up nginx caching and wondering whether it’s working properly? You can check it pretty easily:  
curl -I URL.goes.here
That should return a bunch of information, but the important bit is:
X-Proxy-Cache: MISS
  Well, in this case it’s not working. If it’s working you’ll see a HIT there.

Drupal 8: Configure block or Place Block do nothing

In short, clicking on “Place Block” results in a brief loading icon and then nothing, and Configure Block results in a “This website encountered an unexpected error” message. The fix was found here:  
  Edit the following file – the “core” directory should be in your Drupal 8 root directory:  
[drupal root]/core/lib/Drupal/Core/Annotation/Translation.php
  Before the final }, add the following text:  
public function __toString() { return $this->translation->__toString(); }
  Now try placing a block again and it should work. Please note that until this change is added to the Drupal code this is probably going to revert when you upgrade Drupal.

Drupal 8 – How to enable multi image upload

One of the great things about Drupal 8 is that it has multi-image uploading capabilities built-in, unlike Drupal 7. By default, however, it’s a single image at a time.   To enable multiple image upload for articles, for example, navigate to:   siteurl/admin/structure/types/manage/article/fields   Drupal 8 - Enabling Multiple Image Uploads Click “edit” next to the Image field type, and you’re taken to:   Screen Shot 2015-11-19 at 3.27.02 PM Click on “Field Settings” and scroll down until you see:   Screen Shot 2015-11-19 at 3.27.54 PM Set to “unlimited” as in the above image, save, and you should be good to go!

apt-add-repository: command not found on Ubuntu

Following a tutorial where you’re supposed to add a repository with apt-add-repository but the command isn’t found? You can install it by doing the following:  
sudo apt-get install software-properties-common python-software-properties
  Then re-run the apt-add-repository command and it should work!

How to caption an image – HTML5

How do you caption an image in HTML? One way is using figure tags. Without them, you might use the following:  
<img src=”image.jpg” align=”center” />
  …to create this: logo-open-zfs So, you have an image using the above. How do you make it into an image with a caption?
<figure> <img src=”image.jpg” align=”center”/> <figcaption><center>Caption goes here</center></figcaption> </figure>
Caption goes here
Like that!

SEO: How many words long to make image alt text?

Image alt text purpose

When looking at making sure your image alt text works for your SEO purposes, don’t forget that one of the main purposes of alt text is to provide visually impaired people a description of the content they’re looking at. It can be easy to get carried away filling it up with SEO-oriented keywords, leaving it useless for screen readers and affecting the readability of your website for those who rely on screen readers. So, that said… When looking at your image alt text for SEO purposes, is longer better? Not necessarily!

Current thinking regarding alt text

According to here, here and here below 125 characters is good – probably 10-15 words is a sweet spot to aim for. Beyond that doesn’t seem to provide much usefulness for SEO.

For visually impaired readers, however, there may be a benefit from having longer alt text component to the image – something to keep in mind when looking at your content. From the Penn State University link it seems that some screen readers break the text up into 125-character chunks, though, so longer than that limit may not work well anyway.

Images that aren’t part of content

If you don’t want to put alt text in for every image or have on-page images that aren’t part of the content, at least put in an empty entry – e.g.
img src=”blah.jpg” alt=””
That way screen readers will skip it and not say “image”.

Modules/plugins relating to alt text

There’s a Drupal plugin which scans your website for missing alt text; it’s a dev release but it may be worth looking at if you’re trying to revamp your site and ensure that the alt text is present and appropriate.

How to install Drupal 8 – Step by Step

So, you have downloaded Drupal 8 from the downloads page (link here) and extracted it into your web directory. In our example we have used the RC4 release – we’ll update on release day if anything changes in the process. Here’s what you do next:

Select your language – here English:


Choose your installation profile. If you’re uncertain, choose “standard” – the minimal installation really is quite minimal and if this is your first Drupal experience the standard installation is a lot easier to start from.


On the next screen you have to enter your database details. We’ll do a future article on how to create a database and a user in mariaDB/mysql but for now, we’ll assume that you have already done that. If your database server is installed on the same machine/VPS that you’re installing Drupal on, leave the advanced settings alone – “localhost” will be correct for the location of the database, and the port should be correct unless you have specifically changed the mysql/mariaDB port!


Assuming you entered the database details correctly, the next screen should be the installing process progress bar:


On our Binary Lane test VPS it took under a minute to complete:


Put in your site details in the next screen. We like to choose an administrative account name that isn’t “admin”. Make sure to choose a good password! The password strength meter here seems fairly harsh on rating your passwords, which is a good thing.


Below that, select your default country and timezone settings:


The next screen is… drumroll… your new Drupal installation!


It should be a quick and painless process – now enjoy your new Drupal 8 installation! There will be a lot of people trying out the new Drupal 8 once it’s released later this month – check back here for some more articles on the latest update to one of the best CMS’ around!

Installing Aegir 3 on Debian 8 Jessie/Ubuntu with Nginx

So, after a few failed attempts at installing the Aegir 3 Drupal control system we hit upon this “recipe” as what works for us currently on a fresh install of Debian 8 Jessie or Ubuntu 14.04.

This assumes you are logged in as root. First, update and upgrade your system.
apt-get update && apt-get upgrade -y
For the version of OS that currently gets installed with a fresh Binary Lane VPS we also need to update the base system. We like to use aptitude for that; while we’re installing aptitude, we might as well install the other thing that Aegir needs to install properly:
apt-get install curl sendmail aptitude -y
aptitude safe-upgrade -y
Now, we need to install the database server. We use MariaDB.
apt-get install mariadb-server -y
One that’s done – you will be prompted to enter a root password for the database – we run the following command:
Don’t worry about changing the root password now that you have already set one, but delete the test database when prompted, disable anonymous access and flush privileges. Now we can install Aegir, nginx, php5-fpm etc.:
echo “deb http://debian.aegirproject.org stable main” | sudo tee -a /etc/apt/sources.list.d/aegir-stable.list
curl http://debian.aegirproject.org/key.asc | sudo apt-key add –
apt-get update
apt-get install aegir3 aegir3-provision aegir3-hostmaster nginx php5-fpm
Enter the hostmaster URL – usually the fully qualified domain name. Enter the database root password once for provision and once for hostmaster. Assuming all of the above has gone well, you should be given a one-time-login link in your terminal at the end of the install process, e.g.:
Now, before using that run the following:
Add this to the end of the file:
Defaults:aegir !requiretty
aegir ALL=NOPASSWD: /etc/init.d/nginx
This gives Aegir – the aegir user – permission to restart nginx without requiring a sudo password. Test this works by doing the following: su – aegir
sudo /etc/init.d/nginx restart
What you want to see then is this:
* Restarting nginx nginx
[ OK ]
vim /etc/nginx/nginx.conf
Comment out by putting a # in front of:
# tcp_nopush on;
# types_hash_max_size 2048;
# error_log /var/log/nginx/error.log;
Reboot, and use the one-time-link. You should be logged in fine and now can use Aegir!