How To: Add an WordPress Admin User with FTP

If you’ve ever needed to create an admin user for a WordPress site really quickly, and you don’t want to access the database or control panel, here’s how to do it right in the function.php file of the theme.

Go ahead and add this to the bottom of the file:

Be sure to replace Username, Password, and email@domain.com in the above script with your desired values.

Once you’re done and able to log in with your new user, just make sure you delete this code afterward,┬áthan way nobody runs into this bit of code and discovers your password.

Get Rid Of The Black Border in the WordPress 2016 Theme

To get rid of the black border in your WordPress 2016 theme, simple add the following code to your style.css

 

 

WordPress – How to Fix the HTTP Image Upload Error

In WordPress, to fix the HTTP error when trying to upload an image, there are 2 separate solutions depending on the reason you’re getting this generic error.

Solution 1

Add this line of code the top top of your .htaccess file:

 

Explanation: You’re likely on a shared server that, in order to prevent CPU abuse, prevents you from running multi-thread tasks, which ImageMagick does to speed things up. This tells ImageMagick to limit the thread limit to 1.


Solution 2

Now, if that doesn’t fix the issue, then the below solution will likely work:

Go to your themes functions.php file, and add this code

 

Explanation: Your server is likely running an outdated version of ImageMagick, so what this does is switch the default image editor to GD.

 

 

How To Add Google Fonts To Your WordPress Site the Right Way

Using Google fonts on your WordPress is quick and easy, and can be done in a few ways. Here are 4 separate ways, and we included the best for last. We’ll be using the font called Forum, for our example. Be sure to replace our font URL for the one you want to use.

1. Using a plugin

For a newcomer who’d rather not touch any coding… there are plugins. Both Easy Google Fonts and WP Google Fonts will suffice. This is the easier way, though we don’t recommend it. As with any additional plugin, there is (as slight as it might be) an additional layer to think about when it comes to security, code quality, upgrades, and whatever performance issues there may be. That being said, you can trust the plugins mentioned.

2. Importing

Another method would be importing your Google font in your main stylehseet (at the top).
Format here would be…

This method is simple and effective, but we don’t recommend it as it won’t download the font asynchronously along with the other site content.

3. Going commando on that header

This would entail going to your themes header.php file, and adding the link to your Google font. You should add this so that it comes before your main CSS file, like so:

 

While we feel this is better than the previous 2 methods, there is 1 other way we find best…

4. And now for the right (and nerdy) way.

We at EastSide code try to emphasize best practices wherever possible. In the world of WordPress themes, we think everything should be organized. For this reason, we recommend adding your font reference through your theme’s functions.php file.

 

 

And that’s that. Feel free to add your comments and questions below!