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.
- Left click the WAMP service icon in the system tray.
- Hover over Apache on the pop-up menu.
- Hover over Apache modules on the next pop-up menu.
- Use the arrow button at the bottom of modules pop-up menu and click it until you see rewrite_module.
- If there is no check icon next to rewrite_module, left click rewrite_module. This will restart the WAMP services.
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.
- 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.
- Edit .htaccess in the sections marked in red below. Replace yourwebsitefoldername with the name of your website’s folder.
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.
- In the admin panel of your site, click Settings on the main menu.
- Click Permalinks below Settings.
- Select Post name under Common Settings
- 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.
- In the admin panel, click on Users on the main menu.
- Click the user name (typically admin this early in the process) to edit.
- Uncheck the Show Toolbar when viewing site box.
- 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.
- In the admin panel, click on Plugins on the main menu.
- Click Add New on either the main menu or the Plugins screen.
- In the text box labelled “Search Plugins” type TinyMCE Advanced and hit Enter.
- Click Install Now for TinyMCE Advanced by Andrew Ozz.
- 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.