WordPress update “cannot be installed because we will be unable to copy some files”

If you receive the following error when trying to update WordPress, you’ve probably got your file permissions set incorrectly:

If you have SSH root access to your server, this will likely solve your problem:

1. Navigate to your base WordPress installation folder.

This is folder contains your wp-config.php file and subfolders /wp-admin, /wp-content and /wp-includes.

For example, if your WordPress installation directory is /var/www/html you would type:

2. Change your WordPress file permissions to 664:

(What is file permission 664?)

2. Change your WordPress folder permissions to 775:

(What is directory permission 775?)

3. Change the permissions of your wp-config.php file to 660:

(What is file permission 660?)

4. Try updating WordPress again.

How to migrate a MySQL database from one Linux server to another using the command the line

How to move/migrate a MySQL database from one Linux server to another via the command line using “mysqldump” to export the database , “scp” (secure copy) to transfer it, and “mysql” to import it.

In this example, we’ll migrate/move a theoretical SQL database named twatdb from it’s current location on example.com over to the twat.ca server.

1. Export the database from the old server using “mysqldump”

For our example, let’s say our database is named “junglist”. Before transferring the database file to the new VPS, we first need to create a database dump on the original server using mysqldump:

mysqldump -u root -p –opt [database name] > [database file].sql

2. Transfer the .sql database file to the new server

While there’s many different ways we could move our .sql file over to the new server (SFTP, rsync, etc.) we’re going to use “scp” (secure copy) in this example.

Syntax: scp [database name].sql [username]@[servername]:path/to/database/

Using scp, we’ll put the file in our home folder on the new server:

3. Import the database on the new server

Log in to your new server via SSH and import using mysql:

mysql -u root -p [database name] < [database file].sql

How to check your connection speed with Speedtest.net from Ubuntu/Debian command line

How to check your internet connection speed using the “speedtest-cli” Python application for Ubuntu & Debian and optionally share your results.

1. Install speedtest-cli application

Note: You can optionally skip the “sudo” prefixes on the commands below by switching to root using the sudo su command.

First, make sure your list of repository packages is up to date:

Next, install the Python package manager (pip):

Now install the speed-cli application using Python package manager (pip):

And if you ever want to upgrade the application, you can use:

2. Test your connection speed using speedtest-cli application

To check your internet connection speed, run the speedtest-cli application:

Alternatively, if you want to be able to share your results:

Run the speedtest-cli application using the optional share argument:

Paste the address above into a browser to see the result. Example:

6017542333.png Speedtest.net result

For additional information:

  • Speedtest.net website (the original web-based version)
  • Run speedtest-cli using the optional help argument:

How to quickly save your Winamp playlist as HTML file

Automatically generate an HTML file of your current Winamp playlist to share with others.

Winamp Playlist

To generate an HTML file of your playlist:

In Winamp, Simply press the following on your keyboard:

Control-Alt-G

The HTML file should automatically open in your browser. If not, you can find it at the following location:

C:\Users\USER\AppData\Local\Temp

(Replace USER with your own Windows username.)

 

That’s it, that’s all!

 

View an example playlist I generated:  WinampGeneratedPlaylist.html

How to fix the bug causing incorrect song lengths in Airtime running on Ubuntu 14.04

Guide to fixing the buggy ‘silan’ version packaged with Ubuntu 14.04 which causes Airtime to use incorrect song/track lengths.

There’s a problem with the version of “silan” (Soundfile Silence Analyzer) that’s packaged with Ubuntu 14.04 which causes many (or most) files to appear half as long in Airtime as they should, resulting in songs ending when they’re only halfway done playing. This guide explains how to replace the faulty copy of silan with a fixed/working version.

1. Check which version of silan you’re running

If you’re experiencing the problem mentioned above, you’re probably running Version 0.3.2-1build1 but type the following command to make sure:

2. Add the sourcefabric.org repository to your APT (Advanced Packaging Tool) source list.

Edit the sources.list file using a text editor (nano, vi, etc.):

At the bottom of the file, add the following line (if it’s already there, you can skip this step):

Save and exit (if you’re using nano, press Ctrl-O and hit Enter to save, then press Ctrl-X to exit.)

3. Run the apt-get update command

Type the following to update your repository package lists:

4. Install the sourcefabric.org keyring (used to authenticate packages for security purposes)

Type the following:

Press Y at the prompts.

5. Replace the faulty version of silan

Here’s where we replace the bad version of silan with the the updated/working version. Type the following:

Hit Y at the prompts.
Ignore the warning: dpkg: warning: downgrading silan from 0.3.2-1build1 to 0.3.2~trusty~sfo-1

6. Confirm that you’re now running the proper version

As in step 1, type the following to check with version of Silan you now have installed:

This should now be Version 0.3.2~trusty~sfo-1

7. Prevent Silan from automatically “upgrading” back to the fucked up version

This step is important. Even though Silan should now be working fine, the system will revert back to the original broken version the next time you update unless you type the following:

You should see the message silan set on hold. This prevents the package from being automatically installed, upgraded or removed (see apt-mark manual for more info.)

That should solve the problem!

For additional information on this problem:

How to update firmware on Pioneer CDJ-2000NXS (Nexus) tabletop digital DJ turntable

Guide for updating firmware on Pioneer CDJ-2000NXS (Nexus) Multiplayer digital DJ turntable.

 
This guide is for updating the firmware on the Pioneer CDJ-2000NXS only.

For information on updating similar devices: Pioneer CDJ-2000, Pioneer CDJ-2000NXS2.

1. Check if your CDJ-2000NXS requires a firmware update.

  • Power on the CDJ-2000NXS (button located on back of device, at the right)
  • Press and hold the Menu/Utility button until the Utility screen appears.
  • Scroll down to “VERSION No.” by turning Rotary knob clockwise.
  • Compare against the most recent firmware version number in Step 2.

Note: Firmware version is also visible in bottom right of CDJ-2000NXS screen while it powers on.

2. Download the most recent firmware version from Pioneer

3. Extract (unzip) the firmware file

  • Unzip the downloaded file (eg. CDJ2000NXS_v140.zip) to get the actual firmware update file with the following name:
    C2KNXS.UPD

4. Copy the C2KNXS.UPD file onto a USB drive

  • USB drive must be formatted in FAT or FAT32 (mass storage class)
  • Do not change the name of the extracted file (C2KNXS.UPD)

5. Power off the CDJ, disconnect devices and remove media

  • Power off the CDJ-2000NXS (button is on rear right of device)
  • Ensure no devices are connected (ie. no USB memory, no SD card, no LINK, no computer)
  • Ensure no disc/CD is loaded

6. Power on CDJ while holding USB and Exit/Reloop buttons

  • Power on the CDJ-2000NXS while holding down the USB and Exit/Reloop buttons.
  • Continue holding both buttons (USB and Exit/Reloop) until the message “Connect the USB storage device to the USB port” appears on the CDJ screen.

7. Insert the USB device (from Step 3) into the CDJ

  • Insert USB device containing firmware update (from Step 3) into the CDJ-2000NXS
  • The update process will begin and a progress bar will be displayed on the screen.
  • Update will take approximately 2 minutes.
  • Once complete, the following message will appear:
    “Firmware update is completed. Turn the power off before using.”

Note: If you already have the most recent version, no update will take place.

8. Power off the CDJ again and remove the USB drive

  • Power off the CDJ-2000NXS again (button is on rear right of device)
  • Remove the USB drive containing the firmware update from the device.

Repeat process for any additional CDJ-2000NXS units you have.

For more information

How to burn replacement timecode/control CDs for Serato DJ & Serato Scratch Live (SSL)

It’s always a good idea to keep a few extra timecodes on hand. This explains how to burn replacement/backup Serato Control CDs for free.

1. Download the Serato Control CD

Download the control signal from one of the following sources:

ISO File Format (recommended)

This is a disc image file, for burning to a CD.

After downloading the ISO file, open the folder containing the file and:

  • Mac: Right click on the file and select “Burn to disc” from the context menu.
  • Windows: Right click on the file and select “Burn disc imge” from the context menu.

If you don’t see an option to burn, you may need to download 3rd party software capable of burning .iso files.

WAV File Format

Serato Control CD.wav is a 15-minute stereo 44.1KHz wave file that you can drop into any CD burning application, or run directly off a removable storage device such as a USB key or removable hard drive.

When burning the .wav file to a CD, ensure you burn as an Audio CD (not a data CD), do not adjust the audio levels, make sure any audio auto-levelling features are turned off, and do not down-sample the audio or use a different audio format. In short, burn it exactly as is.

Note: When burning the .wav file to a CD, you won’t have Track 2 (Scroll/Select) which is used to scroll through your songs for track selection. If you require this, please burn using the ISO file instead.

For more information:

Copyright information

The Serato Control Tone, the audio pressed on Control Vinyl and the Control CDs, is copyright Serato Audio Research.

The Control CD download is licensed for personal use only. The creation of personal backups of the Control CD is allowed, however duplicating Control CDs for commercial benefit is strictly prohibited.

For avoidance of doubt the duplication or creation of Control Vinyl for any use is strictly prohibited.

How to change your SSH port from the default of 22 on Ubuntu 14.04

A little security through obscurity by changing the SSH (Secure Shell) port on your server from the default of 22.

This page explains how to change the SSH (Secure Shell) port from the default of 22. Using port 22 doesn’t make your system insecure, nor will changing the port from 22 provide any significant variance in security. However, changing the default SSH port will help stop many automated attacks by making it a bit harder to guess which port the secure shell (SSH) is accessible from. In other words, security though obscurity.

1. Connect to your server via SSH

Connect to your server using an SSH client such as PuTTY (for Windows) or OpenSSH for Mac/Linux

2. Edit the /etc/ssh/sshd_config file using root permissions

To edit the file using ‘nano’:

3. Locate the line that looks like one of the following:

4. Edit the line to remove the # and change 22 to the SSH port number you’d like to use.

For example:

Save and exit. If using nano, press Control-X, then Y, then hit Enter.

5. Restart the sshd service on your server

Type the following command:

You should see something like this:

6. Ensure that you’re able to connect using the new port.

Before disconnecting, we recommend verifying that you’re able to connect using the new port. If you can’t, try repeating the above steps with another port or switch back to 22.

Use your your preferred SSH client (see Step #1) or type the following from your existing shell, replacing 59522 with the port number chosen in Step #4:

For more information:

Copy files to, from, or between different hosts using Secure Copy (scp)

Secure Copy (scp) copies files between hosts on a network. It uses SSH (Secure Shell) for data transfer, and uses the same authentication and provides the same security as SSH.

Examples:

Copy the file “foobar.txt” from a remote host to the local host:

Copy the file “foobar.txt” from the local host to a remote host:

Copy the directory “foo” from the local host to a remote host’s directory “bar”:

Copy the file “foobar.txt” from remote host “rh1.edu” to remote host “rh2.edu”:

Copying the files “foo.txt” & “bar.txt” from the local host to your home directory on the remote host:

See more scp examples:

How to reset your WordPress password using phpMyAdmin

What to do when you’re locked out of your WordPress admin panel.

If you’re no longer able to access your WordPress admin panel because you’ve forgotten or lost your password, fear not; you can reset it by manually editing your SQL database with phpMyAdmin.

  1. Using phpMyAdmin, locate your WordPress database. If you’ve got many WP databases and are unable to figure out which one it is, look at the “wp-config.php” file in the root folder of your WordPress directory and find the line that looks like this: define(‘DB_NAME’, ‘xxxxx’);
    Your database name will be in place of the xxxxx.
  2. Open the database in phpMyAdmin and click on the wp_users table to see the list of WordPress users.
  3. Click on “Edit” on the line representing the user whose password you want to reset.
  4. Edit the user_pass value. IMPORTANT: You cannot type the password in plain text; you’ll need to generate your password using an MD5 hash generator. Go to one of the sites listed below, type in the password you want to use, generate the MD5 hash, and copy & paste that value it into the user_pass field in phpMyAdmin.
  5. Save, and you’re done!

MD5 Hash Generators:
Miracle Salad MD5 Hash Generator
Free Formatter
MD5Hasher.net