Posted on Leave a comment

How to Enable WordPress Error Logging for Debugging

Bugs happen. When they do, error reporting is needed to squash them. Here is how to turn it on.

Look for these line and/or add them to your WordPress wp-config.php file. This file is located in your WordPress home directory.

// Turn on Debugging
define('WP_DEBUG', TRUE); 

// Yes, log errors please
define( 'WP_DEBUG_LOG', TRUE );

// Let's not show errors on the page.
define( 'WP_DEBUG_DISPLAY', FALSE ); 

Now, when things go bad for WordPress, you can see why by visiting this file:

http://[your-website]/wp-content/debug.log

Now go a step further and turn on PHP Error Reporting. Add this snippet next.

// Turn on Error Reporting
ini_set("log_errors", TRUE);

// Report ALL issues, not just the really bad ones.
error_reporting (E_ALL);

// Let's not show errors on the page.
ini_set ('display_errors', FALSE);

This creates error logs in the folder that they’ve happened in. For WordPress theme and plugin issues, we generally are interested in this file:

http://[your-website]/wp-content/error_log

It’s important to point out that once the bugs are squashed, you probably should turn error reporting off. To do this, simply change each TRUE to FALSE.

Posted on Leave a comment

Protect Login Page

This is a simple plugin that protects access to your WordPress website’s login page by intercepting the page request and requiring that a PIN number, up to 8 digits, be present in the URL. Without the proper PIN, no login form is displayed, just a simple message. This plugin will make it harder for hackers to get into your website.

Once activated, you will access your login page like this…

http://yourwebsite.com/wp-login.php?PIN=[your PIN goes here]

IMPORTANT – DO NOT use this plugin if you require login access other than the main WordPress login page, such as the WordPress mobile app.

Installation

To install, simply upload the plugin zip file to your WordPress website and activate it. Configure the simple settings in the new menu that will appear in your Settings menu. Explanations of each feature accompany the inputs.

Frequently Asked Questions

Q: How do I log in once the PIN is set?

A: To log in, just add the PIN value to your WordPress login page URL, like so: http://mysite.com/wp-login.php?PIN=1234

Q: Do I have to add this PIN to the URL each time?

A: Yes, but if you set yourself a bookmark your life will be much easier.

Q: Why did you develop this plugin. Isn’t the login protection itself good enough.

A: Maybe, but I got tired of seeing all of the malicious login attempts in my server logs. I decided to come up with a way to stop this.

Q: What happens if I lose my PIN?

A: If you lose your PIN you will not be able to log into your website. Deactivate the plugin in the database (wp_options.eePLP_STATE = ‘OFF’) or rename the plugin’s folder in your files. You may also contact me for a rescue PIN.

DOWNLOAD HERE

Posted on Leave a comment

Can 2 WordPress Websites Share 1 WP-Content Folder?

YES!

There are a number of benefits to sharing the WordPress content folder; Both websites will have access to the same themes and plugins. This means that both sites could use a single theme, allowing an easily manageable identical look for two domain names. Media files are saved to the same location, but appear separate in WP. This makes backing up easier.

To accomplish this you need to rearrange things and create symbolic links that go from the old wp-content location to the new shared location. Because I like you, I wrote this quick PHP script to make it easy for you. Simply update the $folderA and $folderB variables to whatever your names are. Then upload the file to your website and run the script in your browser: http://yourwebsite.com/symlink.php. Then delete the file once you are done.

Download the Script

<?php // This script creates two symbolic links that allow two WordPress sites to share one common wp-content folder
 
// Rev 07-06-17
error_reporting (E_ALL);
ini_set ('display_errors', TRUE);
 
// Website A folder name
$folderA = 'mywebsitefolder'; // Existing Website

// Website B folder name
$folderB = 'newsitefolder'; // New website to share content

// Shared content folder name
$content = 'wp-content'; // (at same level as website folders)

// Build paths
$websiteA = $_SERVER['DOCUMENT_ROOT'] . '/' . $folderA;
$contentA = $websiteA . '/wp-content';

$websiteB = $_SERVER['DOCUMENT_ROOT'] . '/' . $folderB;
$contentB = $websiteB . '/wp-content';

$contentShared = $_SERVER['DOCUMENT_ROOT'] . '/' . $content;

// Check if the paths are good...
if( is_dir($contentA) AND is_dir($contentB) ) { //
 
 // Rename the original wp-content folder
 $contentB_Saved = $contentB . '_SAVED';
 if(!rename($contentB , $contentB_Saved) ) { exit('Error: Website B wp-content could not be renamed. Aborting...'); }
 
 // Move WebsiteA's wp-content to root
 if(rename($contentA , $contentShared)) {
 
 // Make the symlinks
 if(symlink($contentShared, $contentA)) {
 
 echo "<p>Symlink A Created: $contentA<br />---&gt; $contentShared</p>";
 
 if(symlink($contentShared, $contentB)) {
 
 echo "<p>Symlink B Created: $contentB<br />---&gt; $contentShared</p>";
 
 echo '<p>' . readlink($contentShared) . '</p>';
 
 exit('Success :-) ');
 
 } else {
 
 exit('Symlink B Could Not Be Created :-(');
 }
 } else {
 
 exit('Symlink A Could Not Be Created :-(');
 }
 } else {
 exit('wp-content could not be copied to root :-(');
 }
} else {
 exit('Directory Read Error :-( ' . $contentB);
}

?>

 

Posted on Leave a comment

How to Publish a WordPress Plugin Using Subversion (SVN)

Dealing with WordPress’ Subversion (SVN) system for publishing plugins is, let’s just say, less than user friendly. Why can’t I just upload a zip file? Anyway, figuring out the command line stuff can be no fun at first. So I hope the 8-step snippet below will help you get a jump start on WordPress SVN plugin publishing and make your first publication a smooth deployment.

 

Steps to SVN-ify Your WordPress Plugin

1) Navigate to your local WordPress plugin repository…

Get to a command prompt and navigate to your plugin’s folder.

cd Distribution/Simple-File-List/wp-ee-simple-file-list

 

2) Update the local WordPress plugin Repo…

svn up

 

3) Back up a bit…

cd ../

 

4) Check Out…

svn co https://plugins.svn.wordpress.org/simple-file-list/ wp-ee-simple-file-list

 

5) Analyze (Optional)

Get Status of Repo

svn stat

See Differences

svn diff

 

6) Add New Plugin Files (if applicable)

svn add trunk/*  (or a filename)

 

7) Tag the New WordPress Plugin Version…

svn cp trunk tags/1.2.3

 

8) Check In Your Changes to the Plugin…

svn ci -m “Simple File List 2 – Major Release”

—–

That is it! Your changes are available instantly.

Posted on Leave a comment

All About Web Sites, Hosting and Domain Names

If you’re new to the world of websites, here’s the basics of what you need to know about the various pieces that make up the ownership of a website.

The InterWeb

Domain Names

The first, and most important part of the whole web site system is the domain name, such as google.com or cnn.com. This domain name is your on-line identity. It is obtained from an official internet domain name registering company, such as Network Solutions, Register.com, or GoDaddy. You can change your web site, move to different web servers all you want and people can still get to you the same way they always have. This is because the domain name is configured to point to the current web server. Besides your web identity, it also serves as your email identity.

The domain name needs to be legally owned and ultimately controlled by the person or business it is for. It is common to delegate tasks related to the name (like making sure it points to your web server and making sure the renewal fee gets paid) but you, the owner, have the final say in who get these jobs. When Element Engage does a web site for someone just getting an on-line presence, we often obtain the name for them. But make sure the ownership is in the client’s name and that they understand how to take care of it.

Cost is around $15 per year per name. You can find much cheaper prices around, but keep in mind the extreme importance of the domain name. It’s very important that you trust the registering company and have the ability to control the name yourself. Losing control of your domain name means losing control of your web site.

Web Hosting

The second part is the web host. This is the physical computer server on which your web site lives. Basically, the domain name is set to point to this server. It can be located anywhere in the world. The server is always on and always connected to the net. There are different types of servers with different features, but they all serve the same basic purpose of sending out your pages to people who ask for them.

Cost generally depends on the size of your web site, the amount of traffic you get and the features you require. However, cost for very similar services range from one provider to the other quite a bit.

Element Engage utilizes high performance web servers located in reliable data centers within the United States. These servers run Unix, or Linux, operating system with Apache web server software. This type of web server is the most secure, most reliable, and most common available today.

Web Sites

The third part is the web site. This is the group of files that are located on the web server. This is what you see on your screen, so not too much explanation is required. There are mainly two different types of sites; static and dynamic.

Static sites are traditional sites that simply show pages with information on them. There may also be simple animations and forms to fill out. The content on static sites needs to be put in place by someone with a fair amount of technical ability, like a webmaster.

Dynamic sites, like WordPress, are sites where the pages are assembled on the server depending on what the user requests. They are typically used for sites where company staff members frequently change content or for sites that offer interactivity, like blogs and forums, where the visitors themselves can make content appear on the pages. For many dynamic sites, once the webmaster puts the web site into action, changes may be made by delegated people via a Content Management System. This allows a non-technical person to do most of the web site maintenance, thus saving on webmaster costs. Predictably, static sites are cheaper than dynamic sites to implement. But, depending on how often the site will be updated, dynamic sites may be cheaper in the long run.

Either type of site can be very effective in getting your message across to the visitor. Dynamic sites are generally more search engine friendly, faster and more reliable. However, even though dynamic sites allow a world of opportunity, they require continual watching and software version updates to remain stable and secure.

Why Not Start a Conversation with Us

Posted on Leave a comment

Move Your Etsy Store to a New System

Logo-1Had enough of selling on Etsy? Element Engage can help you migrate your Etsy Store to your own website. I’ve developed migration scripts that help make this daunting task go quickly.

I’ll move your Etsy store to a WordPress-based E-Commerce website. You’ll be able to manage your products, orders and complete website content all by yourself, and with much more flexibility and less restrictions.

Save money on listing and transaction fees. Let me migrate your Etsy store to your own website using your own domain name.

Contact Me to Learn More

Posted on Leave a comment

Installing Final Cut Studio 5.1 on Newer Rosetta-less Intel Macs

Can’t Install Final Cut Studio 5.1 on OSX Mavericks, Mountain Lion, or Lion?

Mac-Installer-PackageHope this quick post helps somebody. Because the newer Intel Macs no longer have Rosetta installed (a program used to run older PowerPC apps), you cannot install Final Cut Studio 5.1 using the normal installation method because the installer is a PowerPC application and is no longer supported. FCP will run fine on your Intel Mac, but the installer will not. To get around this, use Terminal to install the suite from the command line.

*Be sure you have a good current backup. This process requires some risk. Also, be sure you know the admin password for your Mac.

  1. Open Terminal by going to Applications > Utilities > Terminal
  2. In the Terminal box, type cd /, which means change directory to the root. This makes sure you are at the top level of the directories.
  3. Now type ls. This will return a list of the directories. Make sure you see the one called Volumes.
  4. Now put in your first Final Cut Studio 5.1 disc, this should be Final Cut Pro.
  5. Copy and paste the first command in the list below into the Terminal box at the prompt.
  6. Terminal will now ask you for your password. Type it in and hit return.
  7. You should hear the DVD drive spin up and the installer will begin. Let it go until Terminal prompts you that the process is complete. If you’re quick with the disc switching, you may not have top run the next command.
  8. Put the next disc in and run the next command. Rinse and repeat.

Final Cut Studio 5.1 Terminal Installation Command List

Disc 1) sudo installer -package /Volumes/Final Cut Studio/Installer/Final Cut Studio.mpkg -target /

Disc 2 ) sudo installer -package /Volumes/Live Type Media 1/Installer/LiveTypeMedia1.mpkg -target /

Disc 3) sudo installer -package /Volumes/Apple Loops for Soundtrack Pro/Installer/AppleLoopsforSoundtrackPro.mpkg -target /

Disc 4a) sudo installer -package /Volumes/DVD Studio Pro.mpkg/Installer/DVDStudioPro4.mpkg -target /
Disc 4b) sudo installer -package /Volumes/DVD Studio Pro.mpkg/Installer/DSPContent.mpkg -target /

Disc 5) sudo installer -package /Volumes/Live Type Media 2/Installer/LiveTypeMedia2A.pkg -target /

Disc 6a) sudo installer -package /Volumes/Motion/Installer/Motion.mpkg -target /
Disc 6b) sudo installer -package /Volumes/Motion/Installer/MotionContent.mpkg -target /
Disc 6c) sudo installer -package /Volumes/Motion/Extras/Motion HD Templates.pkg -target /

Disc 7) sudo installer -package /Volumes/Soundtrack Pro/Installer/SoundtrackPro.mpkg -target /

Have a Different Version?

This process will work for other FCP and OSX versions too, but some changes may be needed to the Volume name and installer file package names.

sudo installer -package /Volumes/ … Volume Name … /Installer/ … Installer Package Name … .mpkg -target /

 

Hopefully, this little bit of info will make someones day.

Mitch

Posted on Leave a comment

Ice Fishing Videography

A few weeks ago I got the chance to get behind the camera again and shoot some of the video for Tom Zenanko and his TV Show / Website Ice Fishing Today. It’s hard work, but a lot of fun. When I shoot, I don’t get to fish much, usually. But getting out there and seeing some great fishermen in action is a real treat. Nothing like a ringside education.

Here’s the result of the first of a two-day shoot; Crappie Paradise. The second day’s work is still coming and I will post that when I can.

IFT_Show_Crappie_Paradise

If you ask where I was I’ll have to say I have no idea. It was a private lake and we walked a long way to get there, on about 6″ of ice pulling some heavy gear.

I’m usually just the web guy and video editor, I haven’t shot since the first season. After which I questioned my talent and physical abilities for this career path. However, after watching three seasons of me NOT shooting it and playing arm-chair camera man I thought I’d give it another try. Watch and see for yourself. I know what I did wrong. I’d love to hear your comments.

Mitch