Web Site Design Blog

Tag: MySQL
November 9, 2010

Deazzle is a custom designed ‘Deal of the Day’ web site. Deal information is entered and scheduled using a content management system. This web site also features a business directory, coupons, WYSIWYG content editor and many other features that are continually being updated and developed.

Working with websitedesignby is a truly amazing experience. I had worked with 4 other website development groups previously for other websites or projects and I have never been as pleased with the high level and quality of service that I get from websitedesignby. Ross has design talents as well as being analytical. He not only listened and developed what we were looking for, but he presented ideas and solutions to make the website/project better. Working with websitedesignby is a pleasure and I would recommend them to all my business associates regardless of the size of project.

  • Share/Bookmark
April 22, 2010

When I am working on a website I have a local development version that I program and test locally. When an update is implemented, it is tested locally before it is copied to the live server. Wordpress sites are treated no differently. Here is how you can make the wp-config.php portable to work in your live and local environment. Simply replace the variables below with the actual information for your web site and you will be have a wp-config.php that can happily thrive in both environments.

I defined an additional constant ‘LIVE’ that I can refer to elsewhere in my code to determine if I am on the live server or not.

wp-config.php


if($_SERVER['HTTP_HOST']==’livedomain.com’ || $_SERVER['HTTP_HOST']==’www.livedomain.com’){

define(‘DB_NAME’, ‘db_name_live’); // The name of the database
define(‘DB_USER’, ‘mysql_username_live’); // Your MySQL username
define(‘DB_PASSWORD’, ‘mysql_password_live’); // …and password
define(‘DB_HOST’, ‘localhost’); // db host
define(‘DB_CHARSET’, ‘utf8′);
define(‘DB_COLLATE’, ”);
define(‘AUTH_KEY’, ‘put your unique phrase here’);
define(‘SECURE_AUTH_KEY’, ‘put your unique phrase here’);
define(‘LOGGED_IN_KEY’, ‘put your unique phrase here’);
define(‘LIVE’, true);

}else{

define(‘DB_NAME’, ‘name_of_db_local’); // The name of the database
define(‘DB_USER’, ‘mysql_username_local’); // Your MySQL username
define(‘DB_PASSWORD’, ‘mysql_password_local’); // …and password
define(‘DB_HOST’, ‘localhost’); // db host
define(‘DB_CHARSET’, ‘utf8′);
define(‘DB_COLLATE’, ”);
define(‘AUTH_KEY’, ‘put your unique phrase here’);
define(‘SECURE_AUTH_KEY’, ‘put your unique phrase here’);
define(‘LOGGED_IN_KEY’, ‘put your unique phrase here’);
define(‘LIVE’, false);

}

// You can have multiple installations in one database if you give each a unique prefix
$table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!

// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to ‘de’
// to enable German language support.
define (‘WPLANG’, ”);

/* That’s all, stop editing! Happy blogging. */

if ( !defined(‘ABSPATH’) )
define(‘ABSPATH’, dirname(__FILE__) . ‘/’);
require_once(ABSPATH . ‘wp-settings.php’);
?>

MySQL Queries

Another thing to be conscious of when moving between a live and local server environment with Wordpress are couple of records in the wp_options table of the database. The siteurl and liveurl records will be different in your local environment and live environment. If you copy your database from one to the other, just run the appropriate query below (with the liveurl and localurl variables changed to your actual data) depending on if you are copying from local to live or live to local.

Live to Local Query

Run query on local database.

UPDATE wp_options SET option_value=’http://localurl.com’ WHERE option_name=’siteurl’ ;

UPDATE wp_options SET option_value=’http://localurl.com’ WHERE option_name=’home’

Local to Live Query

Run query on live database.

UPDATE wp_options SET option_value=’http://liveurl.com‘ WHERE option_name=’siteurl’ ;

UPDATE wp_options SET option_value=’http://liveurl.com’ WHERE option_name=’home’

If you have any questions or suggestions, your comments are welcome below.

  • Share/Bookmark
April 13, 2010

A Girl From Jersey

This site was custom developed for ‘A Girl From Jersey’ creations: unique coastal gifts available for wholesale to retailers.

The Problem

When Joanne initially approached me, she had a basic site that a friend had created using WordPress. She did not feel the site was a true representation of the quality of her work and did not have the level of professionalism she wanted to portray her business. It was also difficult for her to maintain as she only had a few pages of content but needed the ability to upload multiple photos into various categories and themes. The way the site was set up was not optimized for the photo gallery type setup she needed. I figured I could give her WordPress template a makeover and install a photo gallery plug-in. After researching plug-ins for galleries I did not find the perfect one I was looking for. Specifically we to be able to upload products and associate multiple categories and themes to each photo. On the front end we wanted visitors to be able to browse a category and have the photos separated and sorted by theme and when browsing a theme, separated and sorted by category. Seemed simple enough, however I never found what we were looking for.

The Solution

In thinking about the design and needing to move forward with the project I decided to build the content management system myself.

The Result

Dear Ross,

Thank you so much for all of your efforts on my new website. The process has been enjoyable from start to finish. I’ve been able to express my present and future needs to you, which you have taken and turned into a beautiful website that meets my current needs and can expand as my business does. I don’t know which I appreciate more: the website that is visible to all visitors or the part that only I see. As an artist/manufacturer, I get paid for the produts I sell, not for the number of hours I put into maintaining my website. So the easier it is for me to upload photos of new work, the sooner I can get back to painting. And the behind-the-scenes tools you have given me to maintain my site do just that. They are wonderful!!! I didn’t need to take classes, buy special software or enter into a 2-yr commitment; you’ve made updating my site as easy as sending an email with an attachment!! I look forward to using your services in the future as my business grows and will gladly recommend you. It has been a pleasure! Thank you!

Joanne Murphy

  • Share/Bookmark
September 26, 2009

Nature Song 2009

naturesong.net was redesigned in 2009 to address some issues with the shopping cart, integrate a reseller login so resellers can log in and purchase CDs at a discount and NET 30 payment terms and generally update the look and feel of the site.

The shopping cart and content management system is completely custom. I decided to create a custom system for this site because I had a clear vision of how it should work. The owner, Bill Leverick, wanted to be able to easily update the CDs available for sale. I knew there were off-the-shelf shopping carts and content management systems I could probably have used or customized. Because these products had an ‘audio sample’ component to them that we needed to attach and be able to associate audio files with multiple products, I decided to build it myself. The site integrates PayPal Website Payments Pro for it’s merchant service provider and the UPS API to get shipping information from UPS in real-time for orders with quantities above 2 CDs. The AJAX overlay for each product uses the jQuery framework to handle the JavaScript effects.

In retrospect I am happy with my decision to go completely custom with this site. It allowed me to develop exactly what the client was looking for without excess functionality that he didn’t want or need and might have confused the process. It also allowed me to address his fine-tuning requests quickly and not have to compromise because of an off-the-shelf software limitation.

Here is a quote from the owner:

Ross,
I just logged on to check out the new NatureSong site that you activated today. I am very pleased not only with the graphics, but with the built in ability for me to make necessary changes to the products. You have done a great job and I would heartily recommend you to anyone. Please feel free to use this site and my other web site, Cape Cod & New England Gift Show as examples of your work.
Thanks,
Bill Leverick

View Project

The original site I developed in 1998 can be seen here.

  • Share/Bookmark