Facebook uses the Open Graph protocol (OG) which enables any web page to become a rich object in a social graph.Continue reading →
There are times when you do
git pull or
git pull rebase you get a lots of files that other people contributed that leaves you with lots of untracked files or may be other situation, first thing to try is:
Certbot, Let's encrypt provides free SSL certificate head to their site where you can select your operation system and it will show you what software you need to install. Once you have installed certbot to install ssl certificate on a single domain this is wah tou need to do:Continue reading →
First create a project folder and navigate to it using terminal once there type:Continue reading →
There a few ways of using jekyll custom variables one is to put for example the following in the
Missing module messageContinue reading →
Updating Drupal8 CoreContinue reading →
Website not working on non wwwContinue reading →
Curl development headers with SSL supportContinue reading →
Here is a list of some very usefull mysql commands. If you need more commands on sql check out the full sql reference.Continue reading →
To place custom block in the page, whether it is a block module that you have develope or just a custom modeule you would need to go to:Continue reading →
Similar to symfony Drupal8 annotations are written in php as a comment above a class or a function and contain metadata about a class or a function.Continue reading →
In cases where you have a drupal taxonomy page and you need the term id you can get that by the folowing code:Continue reading →
If you have a VM server like for example drupal vm and want to make use of xdebug so you can then debug your code on of the first things you need to do is to enable xdebug on config.yml file which you can just uncomment line for xdebug.Continue reading →
Problem Removing a file that has a space int the filenameContinue reading →
There are many ways of deleting fields saved in drupal features such as creating .install and using hook update. The other way that I found esier is to delete the field with drush and then update the feature. Here are the steps:Continue reading →
Can not create a new page on drupal
If you get this error these are the thing that you can do to solve the issue: 1) On dev enabled the error messages for drupal i.e.Continue reading →
Drupal and the server by default limits the file size to 2MB to change this you need first to change the php.ini file in the root of drupal directory, if it exist if not create a php.ini file and set uploadmaxfilesize = 2024M or whatever value you would like to, the other thing that yo need to do is to change a core drupal file file.inc which is at this location includes/file.inc at around line 2073 function fileuploadmaxsize here you just need to change a variable (static $maxsize) this variable stores the file size in byte, so to get the right number you have to covert the value in bytes.Continue reading →
These are some of the drush commands that can be used with druapl 7Continue reading →
Assign a User to Database on Sequelpro
Create a user and a password then assign it to a database with the correct privileges, if you db insert then the localhost should be % sign under the username in the sequelpro.Continue reading →
Upgrading php version on XAMPP for mac.
The easiest way to upgrade PHP version is to download the XAMPP for mac (currently XAMPP comes with PHP v5.5.11) and here are the steps to go through:
1) Back up local database
2) Back up entire htdocs (or even better all xamppfiles)
3) Remove old XAMPP
4) Install the new one
5) Check php version by going here
6) At this point if you check on terminal for PHP version (php -v) it still might give you the old version in which case you need to delete this
/usr/bin/php so navigate to this dir
cd /usr/bin then do a sudo rm php
7) Check php version should show the correct version. Put all the conent of htdocs in to the new installation
8) Create a virtual host form the old httpd-vhost
Drush not working xampp.
If you have the situation where drush does not work that could be because you need to add myslq on your path. In that case you need to add the following on .bash_profileContinue reading →
Creating a Subdomain Ubuntu with load balancers.
The AA record of the subdomain needs to be updated for these to work then you can get the DNS details by clicking on the
site->load balancers ->description tab
WordPress Multisite Issue while setting up locally.
While working on a multisite wordpress site I encountered a few errors that I couldn’t get the site to show properly what I did eventually is install a multisite form scratch and then import the database from the live site to local but not delete the schema already created when installing a multi site. So first thing to do would be to setup a wordpress multisite on your locall machine once that done truncate all tables then import the the database from live envirnoment.Continue reading →
Issue with Image Upload.
If you are having problem with image upload go to settings->media and under ‘uploading files‘ see it has been specified the directory where the images should go, by default this is on wp-content/uploads.Continue reading →
How to create breadcrumbs in wordpress.
To create breadcrubms all you need to do is add the following code into functions.phpsContinue reading →
The specified host network collides with a non-hostonly network! - while trying to connect to VM database.
If you get the following error:
The specified host network collides with a non-hostonly network!
Access domain name on host machine.
Connect to VM database from your machine.
When you have created a virtual machine e.g. drupal vm once everything has gone well then you would need to ssh to VM and add database and grant privileges to your user name to all databases. To do that do the following:Continue reading →
If you just created an instance for this first install the updates by typing this command:Continue reading →
The steps in this tutorial require the user to have root privileges on the virtual private server. You can see how to set that up in the Initial Server Setup Tutorial in steps 3 and 4. Furthermore, if I reference the user in a step, I’ll use the name www. You can implement whatever username suits you. Additionally, you need to have nginx already installed on your VPS. If this is not the case, you can download it with this command: sudo apt-get install nginxContinue reading →
On AMAZON AWS Locate the machine that's causing your performance issues and try to look at it's monitoring graphs. You should probably spot traffic and server load peaks, some might be running for extended periods of time.Continue reading →
To show environment variables run this command:Continue reading →
You man need to add a new GlusterFS Client as not only both Prod A and B server can be added to gluster. These instructions ar written for Ubuntu Linux distribution and Gluster Client min version 3.2 On the client machine; 1. sudo apt-get install glusterfs-client 2. sudo mkdir /mnt/glusterfs 3. sudo mount -t glusterfs gluster-prod1.com:/stcproduction /mnt/glusterfs (you can use either gluster-prod1.com or gluster-prod2.com) if you get an error like fusermount: fuse device not found, try ‘modprobe fuse’ first type sudo modprobe fuse Followed be step 3 Now it should be setup and you can make your projects folder under /mnt/glusterfs Bare in mind you need edit /etc/fstab to make mount available on reboot. sudo vim /etc/fstab and add this line gluster-prod1.com:/stcproduction /mnt/glusterfs glusterfs defaults,netdev 0 0 (gluster-prod1.com:/stcproduction should match from step 3.)Continue reading →
There are these steps that you need to follow:Continue reading →
Installing drupal 7 on ubuntuContinue reading →
Error While Installing DrushContinue reading →
Cloning repository on ubuntuContinue reading →
How to install git on ubuntuContinue reading →
Assigning an exiting key pairsContinue reading →
How to asign an elastic ip addressContinue reading →
How to access amazon RDS DatabaseContinue reading →
How to add a load balancer on AWSContinue reading →
To create an instance on dashboard lunch an instance then you can choose what instance and name the instance.Continue reading →