OG Pt1: Duplicate Open Graph Meta Tags and the Facebook Open Graph Object Debugger

WordPress themes and plugins can cause duplicate Open Graph Meta Tags

In this case, the WordPress Avada theme and the Yoast SEO plugin are both sending OG:url meta tags, causing this Facebook scraping error. Additionally the Facebook Open Graph Object Debugger may display other errors and can be helpful in debugging them.

Avada > Theme Options > Advanced > Theme Features > Open Graph Meta Tags > Off

I elected to turn off the Avada Open Graph Meta Tags setting, save changes and then enable the Yoast setting.

SEO > Social > Facebook > Facebook settings > Add Open Graph meta data > Enabled

Notice I also added an Image URL to display an image if the post/page being shared does not contain any images.

If you do not see the Social menu option, enable your Yoast advanced settings. Be sure to ‘Save Changes’ and you are set.

Thanks!
-Yehuda

Be sure to see the next post in this series:
Facebook Open Graph Object Debugger and the Share App ID Missing Warning

Adding PHP to Ubuntu 16.04.02

Adding PHP and extensions for WordPress and Magento

This will install PHP and add the extensions needed for WordPress

# apt -y install php libapache2-mod-php php-mcrypt php-mysql php-mbstring

# vi /var/www/html/info.php

Browsing to your server hostname or IP address with /info.php at the end will show your PHP configuration

This script will show PHP extension status, and in particular extensions needed for Magento

# vi /var/www/html/extensions.php

Browsing to your server hostname or IP address with /extensions.php at the end will show your PHP configuration

This will install and activate the extensions needed for Magento

# apt -y install php-bcmath php-curl php-gd php-intl php-soap php-xml php-zip
# systemctl restart apache2

Note: php-xml includes xml, simplexml & xsl

Browsing to your server hostname or IP address with /extensions.php at the end will show your PHP configuration

# vi /etc/php/7.0/apache2/php.ini ## uncomment/change the following lines

# systemctl restart apache2

Thanks!
-Yehuda

Adding MySQL to Ubuntu 16.04.02

Installation of MySQL to a DigitalOcean Ubuntu 16.04.02 Server

# apt install -y mysql-server mysql-client
# mysql_secure_installation

Test root login and MySQL
# mysql -uroot -proot_password

 

WordPress MySQL Configuration

# mysql -uroot -proot_password

Test wordpress login and MySQL
# mysql -uwordpress -pw_password

 

Magento MySQL Configuration

# mysql -uroot -proot_password

Test magento login and MySQL
# mysql -umagento -pm_password

This may need to be set higher than 16MB for larger product numbers

 

Configuring for MySQL WorkBench remote access

# vi /etc/mysql/mysql.conf.d/mysqld.cnf

 

Remote access from any host

Open firewall to any host
# ufw allow proto tcp from any to any port 3306

Remote access from specific host

Open firewall to specific host
# ufw allow proto tcp from 192.168.1.50 to any port 3306

Thanks!
-Yehuda

Adding Apache2 to Ubuntu 16.04.02

Initial installation of Apache2 to a DigitalOcean Ubuntu 16.04.02 Server is fast and easy

# apt install apache2
# apache2ctl configtest
# vi /etc/apache2/apache2.conf

# apache2ctl configtest
# systemctl restart apache2

One last thing before testing, let’s open up the firewall

# ufw allow proto tcp from any to any port 80,443

Browsing to the server hostname or IP address you should see a screen that starts out like this:

Configuring Apache VirtualHosts

I like to make a new directory for the virtual hosts

# cd /; mkdir www

Make the following changes

# vi /etc/apache2/apache2.conf

Move index.php to be first

# vi /etc/apache2/mods-enabled/dir.conf

# systemctl restart apache2

Copy the virtual host file

# cd /etc/apache2/sites-available
# cp -a 000-default.conf name-of-virtual.openuptown.net.conf

Make appropriate changes

# vi name-of-virtual.openuptown.net.conf

Enable the site

# a2ensite name-of-virtual.openuptown.net.conf

Reload Apache and bam!

# systemctl restart apache2

Thanks!
-Yehuda