Move WordPress to new domain with full URL redirects

Disclaimer: If you break something, too bad. You’re responsible for your actions. This worked for me.
Take backups of your database and files for both domains!

It’s usually not recommended to switch domains since search engines might take some time or not index your moved stuff at all for some reason. Also, frequent visitors might stop visiting your site and old links might stop working after a while if you let the old domain expire…

But lets say you really want to move the domain.
First, it’s important that you use the same permalink settings on both sites otherwise this will not work.

Ok, lets begin, login to WP Admin.
Go to “Tools” and choose “export”.

Export everything and save it as a XML-file.
Don’t worry about the pictures and stuff, WordPress will download that later automatically.

Now, go to your new site and under “Tools” you’ll see “Import”.

Just import it, it might take a while if your site is huge. Don’t click the button twice.

Is the Import OK?
Good. If not… Well, Google and find out what’s wrong.

If it’s good, then login to SFTP/FTP or whatever and open your “.htaccess”-file on the old server and place this bit of code there:

# BEGIN WordPress

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.nordicnode\.com
RewriteRule (.*)$1 [R=301,L]

# END WordPress

Replace my domain name with yours by the way. 😉
Hopefully you got it working with the permanent redirects now!

How to create a Windows shortcut to lock the screen

How many times have you been thinking “all my programmer friends are here and I really need to go to the bath room but what if they see my lame code!?”.
And you really wish you could remember the command to lock the screen in Windows? It happens all the time, right?

You don’t have to worry anymore. With this simple shortcut you just need to double click it, or just click it once depending on where you put it and Windows will lock the screen instantly.
You can put the shortcut to lock the screen in you taskbar, startmenu, desktop…

And then when you’re back at your PC again, you just have to type your password to get back into the session right where you left off.
Here’s what’s working for Windows 10, it will probably work for earlier versions of Windows too.

How to create the lock screen shortcut
1: Right click on your Windows desktop to bring up the menu.

2: Hover over “New” and click on “Shortcut”.

3: If you have Windows installed under “C:\Windows” like most people do, just copy and paste the following line into the text field “Type the location of the item”.

C:\Windows\System32\rundll32.exe user32.dll,LockWorkStation

Press, “enter” or click the “Next” button and choose the coolest name you can think of for your new shortcut!
That’s pretty much it.

Well, I forgot one really important part. You can also choose icon for the otherwise ugly shortcut. Right-click on it and go to “Properties”. Under the “Shortcut” tab you’ll see a button that allow you to change the icon. You can download a ico-file from the Internet or use ones already on your system.

Bonus Tip: Lock the Windows screen with your keyboard

And here’s a little bonus tip that’s really handy. You can lock your screen within 1 second by pressing CTRL + ALT + DEL and then enter. So, after all you don’t really need a shortcut.

Visual Subst – Virtual Drives Shortcuts To Folders

Visual Subst is a great tool to save some time while browsing the filesystem. For example, if you got a download folder in c:\my folder\documents\download\ you can simply create a virtual drive for it like x:\ or something like that.

So you can more easily browse to that folder within a second instead trying to find it when there’s 100’s of folders. It’s very useful if you have many different folders you need to access often.

Website: Visual Subst