Ben Rothman Website Archives - Ben Rothman, Web Developer
Categories
Website WordPress

Could not create directory. Installation failed.

This happens sometimes after migrating from one host to another. The problem boils down to a permissions issue. If you copied the uploads folder to the new server via an ssh connection sometimes the owner of the files copied will be whoever you connected with to perform the copy.

If you want to confirm that this is in fact the issue you can run:

and you may see something like:

`

Which says that root is the owner because that is the user that copied the file onto the server, even though for WordPress to write to the folder, the owner needs to be www-data. This issue can easily be fixed by issuing the following command:

Now the owner will be www-data and you will be able to upgrade files again! Happy WordPressing!

Categories
Website WordPress

How to Login to WordPress

You just installed WordPress, you are feeling tech-savvy… you basically invented the internet, haha

You were able to create your nice site, or maybe got started, but you quit your browser or logged out or something else logged you out and now you just want to get back onto the WordPress dashboard. When you first set up the site it logged you in automatically, getting back in is only a little harder.

In your URL bar just navigate to <yourwebsite.com>/login: (you may have customized the URL or something so that /login will not work anymore, but this method is the default and will work as long as you did not customize anything) ((if you know what I mean then you know if you customized the URL, if you know, you know))

That simple step was the first of two steps, both of which are easy! After entering the URL described above, you wil be brought to the WordPress login page:

The above picture is what it looks like by default, but you can customize your login page if you want. Type in the username and password combo for the administrator account that you set up when you first created the website, click “Log In” and BAM, you are now on the WordPress Dashboard pictured below:

Your dashboard may look slightly different if you have installed plugins or customized it in other ways, but the dashboard is the dashboard. If you see something that resembles the image above then you have achieved great success and you are logged in!

Categories
Project Web Development Website

Park Picker

This project is written with PHP, HTML/CSS and JQuery with some light javascript in there too.

I was given a list of parks, tags that relate to them (like dogpark, pond and bike path), the park’s website and a picture of that park; I made all of that information into a JSON file. All of the tags of every park are all listed all together each one time and the user chooses the tags for their ideal park, something that has all of or as many of the tags as possible.

The JQuery then immediately rebuilds the page (without a page refresh) and lists the parks in order of how many tags it has that match the tag criteria as well as gives a grade to each park that shows how many tags.

It’s not a terribly complex project, but it gets an important job done and solves a problem in away that is relatively easy to maintain.

This project can be found on my GitHub at: https://github.com/brothman01/park-picker

Categories
Web Development Website WordPress

How to Add a Custom Taxonomy to Users in WordPress

Last Tested: 2/5/2022

This will guide you through setting up a custom taxonomy that you can add to and change whenever you are looking at the profile of a user, it has functions to register, display and save the changes to the taxonomy. In our example we are going to assign each user a department or departments, to later use to give them access to the page or pages for the given department.

/* Step 1 Register the Taxonomy */
Register the taxonomy by placing the function below in your functions.php file or in your plugin file depending on your preference:

Step 2: Add the Admin page for the custom Taxonomy by adding the code below to your functions.php file or to a plugin file. We will add this page as a sub-item of the Users menu on the WordPress dashboard. This page will allow us to define the different more specific departments that will be options in our custom taxonomy like ‘Sales’ and ‘IT’. Don’t forget to actually add those departments to the taxonomy or no choices will be rendered:

/* Step 3 */

As the next step we are going to add the code below to… you guessed it, the functions.php file or a plugin file. The code below is going to add the taxonomy we defined in the previous steps to the profile of every user so that we can set each user’s department.

/* Step 4 */
Define the function for saving the custom taxonomy by putting this code into… well the functions.php file or a plugin file. You probably get that by now but the code below does define that function:

That was it! Four steps to add this awesome functionality. This data stored per user is very useful for having different types or tiers of users that have access to special content that is hidden from everyone else. Happy WordPressing!

Categories
Web Development Website WordPress

WP Employees

This is a small WordPress plugin I wrote to use for an issue I ran into a lot as a freelancer. Many small businesses want to make a “Team Page” to showcase their staff and make the business more personal. I found myself getting needing to create these same team pages for multiple clients on WordPress.

Ahh, that sounds like an opportunity for me to work some WordPress magic, and use Custom Post Types along with custom fields to generate quick team pages.

So I did just that using PHP, HTML and CSS. The code is available on my GitHub at the link below. Happy WordPressing!

Categories
Website WordPress

WordPress 4.6

Version 4.6 of WordPress, named “Pepper” in honor of jazz baritone saxophonist Park Frederick “Pepper” Adams III, is available for download or update in your WordPress dashboard. New features in 4.6 help you to focus on the important things while feeling more at home.

Categories
Website WordPress

WordPress 4.5

wordpress 4.5 coleman

WordPress 4.5 Named for Saxophone King Coleman Hawkins

On April 13th, WordPress released Version 4.5 and this one pays homage to the legendary tenor saxophonist Coleman Hawkins.

Born in 1904, Colman Hawkins was the first noted musician to take the sax and make it a jazz instrument. He also nudged jazz out of Swing and into Be-Bop. You might call him the King of Jazz Saxophone.

Categories
Web Development Website

NJ Devils

I designed the mascot page for the NJ Devils! The Devils use some other strange CMS that I do not like as much as WordPress but it was fun to work around the rink where the team plays and concerts for various famous artists are held.

Categories
Web Development Website WordPress

Hello World!

!Hello World! Welcome to my new website or if you are looking later on, my old website. I obviously used WordPress to make this showcase for my professional work, (resume and portfolio) as well as some of my adventures. I’ll post some of the cool places I go and adventures I go on here, so stay tuned!