“grep” is a command you can use in a terminal to find sequences of characters. It can search through entire folders and find matches. If you use the right parameters, it will display all the matches it finds.
Before simply typing the command, however, you should know it might need a long time to comb through entire folders! So don’t simply type the command in a large folder right away.
Example: don’t just type:
$ grep "philosphy"
in any folder! It will run for ages because you’ve typed a command that doesn’t mean anything. You’ll have the feeling the computer is hanging because nothing happens. If your grep is hanging, follow these steps.
So to search for “string” in all the files of a directory, the easiest is to:
move into that directory
type the following (with the quotation marks, spacing and period):
A terminal is used to communicate commands to your computer. It’s the most basic form of telling it what to do.
Practically, when you use a mouse to click on a file to open it, this is simply a Graphic User Interface (GUI) that converts that action into a terminal command in the background. In this case, “open this file with that program”.
Here are terminal commands, roughly listed in the order you might need to discover them:
grep: this helps you search for a string inside files in a folder.
ssh: this will let you connect to a server (a real one or a virtual one)
Git helps you synchronize and track changes to a folder with its subfolders. A website is basically a folder on a server somewhere. In the folder are subfolders, images, text documents, databases and such. Git makes it possible to synchronize the content of the folders, take a portion out to fiddle with, and then merge it back.
In a way, it does what Dropbox or Box.com do: it tracks changes, notes who changes what, can revert changes if needed (“undo”) and highlights discrepancies or conflicts if something was updated in several locations at once.
Me.
Usually developers sync two folders, when they’re the only ones working on a project:
the server folder far away on the provider’s network,
and their own local server folder on their computer or desktop. This is a “local server folder”, to mimic the work a server does for the website, but on your computer.
Sometimes, they sync three folders:
the server folder far away, active and hosting the side for the public – this is called the “production” server
and, again, their own local folder on their computer or desktop.
If more than one developer are working on the same project, then each of them can synchronize and track changes on their local computer, but they always refer to the main project folder. At this point, I’m not sure whether they can sync files among their local computers without syncing them to the main “repository” first.
Git in itself is a protocol, a standard in the way changes are documented and traced. To apply or use this protocol, you can choose from among different software and platforms.
To use commands and actually use the protocol, you can use either Git Bash (Unix/Linux) or Git CMD (Windows). Regularly update Git Bash with this command:
git update-git-for-windows
A different tool helps you manage the repositories and see what’s in them. For example, Github is a platform that helps you manage git repositories. It works from either their website platform or from Github desktop, a software that you install on your computer.
Aside from Github, there’s also Gitkraken, Bitbucket, Gitlab, and others, too.
Check that the relevant information is accurately set up. For example, category names and slug properties should be correct and match your needs.
Change the permalink structure as described immediately below.
Important – if your website is up and running already, create redirections from the old URLs to the new ones! The method below generates these redirections automatically. Redirections are crucial for SEO, with good reason: users who land in the middle of nowhere need directions to get where they want to go. Redirections guide users instantaneously.
Changing the permalink structure of a wordpress website
In the back-office of the WordPress website, click “Settings” on the left menu bar and find the “Permalinks” tab.
From there, you can select a few basic options:
We’re going to keep the same bullet choice – Custom Structure – but modify the parameters. Here is the new layout:
I manually erased the weird “/index.php/” portion. Then I toggled the parameters just beneath that on and off until I got what I wanted. Note that even though the “category” only appears once, sub-categories will appear fine, as in “/category/sub-category/article-name”.
Click the “save button” and there you go! It’s all updated throughout the website!
Of course, the crucial part then is TESTING… nothing should be declared done until it has been fully tested!
yours truly
In this case, testing means clicking a few pages open and seeing what happens. Here’s what works out-of-the-box:
Homepage opens up fine
Links seem to work, too, clicking from one page to the next without encumbrances
This proves the redirections work well, even though we didn’t do anything special for it
Also, I created a bogus test article that had both a category AND a subcategory, and it worked as intended (removed the test article afterwards):
However, links in past articles are still referring to the old, ugly URL, as shown when you hover over the link with the cursor:
Links that cause redirections isn’t good for SEO. You should go back to each article and re-issue each link. You can do this manually when there aren’t too many posts, but if you’ve got more than an hour’s work then it’s better to automate it.
In the end, a website is like a living creature. Perhaps like a tree or shrub growing in a well-tended garden. It needs pruning and care, and how you do it depends on what you want to get as a result.
Example with the FreshAngle.eu website
On this website, I hope to have several points of interest.
A language website to learn a few exotic languages
A coding website which shares basic information on coding and developing websites
A website where people can learn about proper SEO practices
As a result, it’ll have three main categories that would result into three main URL slugs. From there, each article will strive to be unique, focused on a single point, and not really dependent on news or time. So no need for the year/month/day structure you see in the initial page slug above.
language category – /speak/ (no, that’s not phonetics, it’s the backslash in the URL)
coding and web development – /webdev/
editorial and, consequently, SEO good practices – /seo/
See? Short, concise yet accurate.
Guidelines for the ideal url slug pattern
Make it simple and easy to understand. Just the urls themselves should be enough to explain what the website is about.
Only include date elements (year, month, day) in the URL if it is really relevant.
A news website might do that to show publishing date and help define journalistic integrity. Indeed, an article could show a URL slug that includes the publishing date but the meta-data associated to the page shows modifications at a later date – this should only be possible if a clear mention of any edits is appended at the end of the article.
An informational or educational website isn’t so time-relevant. What is best there is to structure information in a smart and self-explanatory manner.
Also, project yourself into the future: if you must dive into details about a given topic, how would your page structure evolve? Take a few examples and think it through.
For example, in our Language section described above, we might include tips about French, English and other languages. It would make sense to have sub-categories for these that would also be reflected in the URL:
However, within that language, there might be lots of different types of subdivisions: grammar, vocabulary, trivia, pronunciation… it would be impractical to make any subcategories that dive any deeper than the “language” subcategory. It’ll simply be clearer to have a “basic-french-grammar-summary.html” page, with links to other pages that would remain at the same level within the “/french/” sub-category directly.
One of the most confusing things of starting off as a developer is the mind-boggling amount of logins and passwords you need to work. The term “google” means lots and lots, and it seems a developer needs about one or two google passwords…
It’s largely due to the decentralized nature of the internet. There isn’t a single authority controlling everything and gatekeeping your access to all the tools, plugins and services you need. It’s a good thing. Good things often require nitty-gritty work and details.
Let’s take a look at the first few passwords you’re going to need.
Basic services you need passwords and logins for as a wordpress developer
First off, you need some ways to access and use WordPress. Secondly, it’s important to set things up with Git so you can modify and track changes to website files between your own computer and the production server.
WordPress account for your own website – This is the account you use as an administrator to create your website. It’s the key to your back-office. You can modify everything in your website from this account, as long as it retains administrator rights.
WordPress.com account – note the “.com”: it’s an account created on the WordPress.com website. It can be the same account as above, but you can also create a separate account (even with the same email as the wordpress account for your own website). Here is where you can create a wordpress.com account.
“WordPress.org” account to contribute to the development of WordPress from this more “public” account.
GitHub – This is a specific system that helps you track changes you implement on your website when using the Git protocol. It only tracks file changes when you use git-related commands. You can do this from the terminal on your computer, from the GitHub website, and from GitHub desktop. It won’t track things you might change from the WordPress backoffice. With a GitHub account you can create Git repositories. Here is where to create a GitHub account. An alternative to GitHub is GitLab.
So since I’ve been going about learning web development all backwards (after tweaking websites with the “inspect mode”, my first question was “What is git?”…), I’m slowly putting things in order.
Downloading and installing Local
Local – I’ll call it LocalWP ’cause it’s mighty confusing – emulates a web server’s activity on your local computer. It’s one of the three basic tools for developers.
I understand it’s able to:
create a local server environment that knows how to run all the usual server-side languages
pull a website from the production server to clone it to my local server
track changes to the portion of the website I’m modifying locally
and then sending the changes back to the production server.
After downloading the right version for me (Windows), I double-clicked the installer and after less than a minute I reached the following clear, super-simple screen. Everything was very easy and I only had to click “next”, so it was a cinch!
First steps configuring my website
Remember, the first day of the FreshAngle website wasn’t very far away. I had already had to slog through installing the WordPress package on my OVH server host, create the database that somehow holds the site together, and created a few logins: for the WordPress back-office, the website database, and, for some reason, for FTP transfer.
Since it wasn’t easy, going through the OVH documentation, their email that’s filled with obscure terms, and basically having to repeat some of the steps twice and even erasing the whole thing just because I got the database name wrong (thing something along the lines of “myfirstdatabase” until I realized I’d be stuck with it forever if I didn’t set it right from the start). That green “Create a new site” button above shines ominously…
Let’s click it!
Welp, that wasn’t what I needed. It sets a whole new website up, as if I hadn’t already one running on the other side of the planet. That’s perfect for a new website, though, I guess.
It even created one using another wordpress default template:
But it does have the “freshangle.local” url – and it works swell, that was one of the goals, wasn’t it?
Just that now I have to somehow replace this local FreshAngle site with my real one, the one I opened through WordPress and am now writing this post on…
It seems all the easy “connect to this and that” are only to their Flywheel-hosted websites. I think connecting to my own, OVH-hosted website will require some digging.
Unless it created the new site as a placeholder? That’s a question for another day…
Another advantage of LocalWP (or Local) is that updates are easy to install. It basically re-installs the software but retains your own local documents and sites.
Just started a website and eager to make it look and work better? Here is the first set of tools you’ll need to start digging through the spaghetti of code that’s hidden behind the back-office interface.
The browser
I’ve got four that I use for normal work: Firefox, Chrome, Opera, and Tor.
I like Firefox for its privacy settings and I’ve been used to it for many years.
Chrome I use because it’s the only one that can handle complex formulas on Google Sheets, especially when cell contents include special characters like ?, # and ~
Opera I use for whenever I’m willing to see ads, which is most of my research.
Tor I use because it lets me test for ranking in different countries and has full anonymity. Google searches thus show me more “neutral” results when checking on how my own site competes.
With the browser you check and use your site as a normal user would. On top of that, it’s also:
the gateway to searching for how to code (and find forgotten syntax, shortcuts, etc)
an access point for your website back-office (the WordPress dashboard and editing pages)
an access point for other cloud-based or server-based software (git monitoring, servers, etc.)
The Text editor
All code is text. Everything that runs the website, in the end, is a text file. Notepad works fine, but when files are more than 10 lines long, better software can help. These are called Integrated Development Environments, or IDE for short. Full-blown ones include error identification, syntax correction and auto-completion. Lighter ones only include coloring (gray for commands and red for strings, for instance) and automatic ind
I use Sublimetext, which color-codes certain languages and helps clarify code with indention and the like.
The Local Server Developer software
It’s theoretically possible to just change files and upload them to the production server manually, but it would certainly crash the website if the changes weren’t tested beforehand. So to work on the changes and check that they work at a very basic level, you need to set a local server up on your computer.
That’s what the local server software helps you do. It usually does more than simply being a local server: it often helps you gather the original website from the remote server, and forward any modifications to it when you’re ready. In that sense, it also doubles as a File Transfer Software, or FTP software.
Since I run a WordPress site and I use Windows (I know) on my computer, I went for Local, which is related to WordPress itself.
Several different software packages make it possible to open and run a local server on your computer for you to test website development on.
XAMPP, MAMP, Wamp, and others are available. Most are free but paying unlocks more features. XAMPP has probably been around for longest. New ones include VVV, which somehow is directly related to WordPress.org.
Since I’m running a WordPress website and need something easy to understand and use, I first thought I’d go with Local. Local is somehow directly connected to the WordPress universe. However, it isn’t managed by the same team, and it also relies on synergies with Flywheel.
It seems it doesn’t include an automatic git connection, but the help forum mentions how to connect Localwp and git so that version tracking is complete. The paying version of Local includes MagicSync, which is probably not necessary if I’m using Git and Github correctly.
From what I saw on the features screen, it can even manage, for a single site, the three environments that a website can deploy to:
the local server (duh, that’s what the software is for)