Starting a new project with localhost

 

When starting a new website with WordPress, I first like to do a few things that make my life a lot easier.  Some of them are mandatory if you are developing on localhost, but others are things that I like to do and prevent some headaches down the line.  All of the tips below assume you are using WAMP on a PC and you want to use Pretty permalinks.

Apache Rewrite Module

When you first install WAMP on your PC, Apache sometimes leaves the rewrite module turned off.  Turning it on is simple. 

  1. Left click the WAMP service icon in the system tray.
    Wamp System Tray WordPress
  2. Hover over Apache on the pop-up menu.
  3. Hover over Apache modules on the next pop-up menu.
    Apache Modules WordPress
  4. Use the arrow button at the bottom of modules pop-up menu and click it until you see rewrite_module.
    Apache Rewrite Module WordPress
  5. If there is no check icon next to rewrite_module, left click rewrite_module. This will restart the WAMP services.

 

Edit .htaccess

If you are planning to develop on your localhost, then you will need to edit the .htaccess file after you have installed and setup your site. 

  1. Go to the root of your site on your local drive (e. c:wampwwwyoursitefolder) and open .htaccess by right clicking and selecting your editing program. For me, that program is Notepad++, but you can use the built-in text editor on your computer. 
  2. Edit .htaccess in the sections marked in red below. Replace yourwebsitefoldername with the name of your website’s folder.
    Editing htaccess wordpress

 

Permalinks

I tend to use longer paths to pages when I can for SEO purposes, but when first starting a new site I usually set WordPress to use the Pretty permalinks (i.e http://www.website.com/blog/a-blog/

).  The default permalink setting for WordPress is not pretty (i.e http://www.website.com/?p=123) and provides you no SEO benefits.

  1. In the admin panel of your site, click Settings on the main menu.
  2. Click Permalinks below Settings.
  3. Select Post name under Common Settings
    setting permalinks wordpress
  4. Click Save Changes.

 

Turn Off the Admin Toolbar

When logged into your site’s admin panel while viewing the site, a toolbar will appear at the top of the live site.  This toolbar can cause issues with the styling of the page and create confusion about whether the page will display properly for any visitors.  It is just easier to turn it off and leave one browser tab or window with the live site and the other browser tab or window with the admin panel loaded.

  1. In the admin panel, click on Users on the main menu.
  2. Click the user name (typically admin this early in the process) to edit.
  3. Uncheck the Show Toolbar when viewing site box.
    Admin Toolbar Turn Off WordPress
  4. Scroll down to the bottom of the page and click Update Profile.

 

Update the Post and Page Editor

The content editor that comes with WordPress for posts and pages works well enough, but has some quirks and bugs that are not worth the trouble when you can replace it.  I use the TinyMCE Advanced plugin for WordPress that replaces the built in editor. 

  1. In the admin panel, click on Plugins on the main menu.
  2. Click Add New on either the main menu or the Plugins screen.
  3. In the text box labelled “Search Plugins” type TinyMCE Advanced and hit Enter.
  4. Click Install Now for TinyMCE Advanced by Andrew Ozz.
    TinyMCE Plugin WordPress
  5. After the plugin finishes installing, click Activate to turn it on.

 

When you select a Page or a Post to edit, now you will see a more robust editing environment that allows you more freedom to style your content without hand coding.  There is plenty to learn about TinyMCE, so take your time and play around with it.