Wordpress: Using svg as header image - wordpress

I am using wordpress, theme Twenty Fourteen. I would like to add a svg image as header. I have no problems with uploading svg images (I use them already successfully on my webpage), but when I try to use it as head image the following message occurs: "There has been an error cropping your image". Does anybody knows what the problem is?
Thank you!
Best wishes,
pradhana

I had the same problem. Its the GD Library not installed.
Just use this command to install it:
sudo apt-get install php7.0-gd
Use this to stop Apache for it to make changes
sudo apachectl stop
Start Apache now and everything is fixed.
sudo apachectl start

As Shubham007 said, the GD Library is not installed.
However, for PHP7 on CentOS or EC2 Linux AMI:
sudo yum install php70-gd

Related

Creating custom gutenberg block gives 'Unexpected token .'

I am trying to create a custom gutenberg block to use in the wordpress gutenberg editor but when trying the command: npx #wordpress/create-block test-block it starts with installing a few things but all of a sudden I get:
npx: installed 126 in 13.341s
Unexpected token .
What is causing this?
I am following this tutorial: https://kinsta.com/blog/gutenberg-blocks/ except I am not using any of the hosting options from the tutorial since I have my own wordpress installation already running (locally).
Check your node version, I got the same error using node.js version 12, then I changed it to versi
For folks on Ubuntu: I ran into the same issue and found that the nodejs installable via apt is out of date. I had to download the tarfile from nodejs.org and install it with the help of How to install node.tar.xz file in linux. After that it ran as I expected.
(I tried the LTS version. node --version returns v18.12.0)
I also had this problem. All I needed to do was to update my Node version.
I followed these steps (run in Mac Terminal):
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Hope this helps.

Is there a way to install a rubygem manually without accessing rubygems.org?

So i have this IPv6 thingy issue where i can't access rubygems and connection times out before it gets to use IPv4. One way or another i managed to install rubygems and when i type -v it all checks out. Now i need Jekyll and Jekyll-paginate-v2. I tried gem install jekyll and it didn't work for reasons stated above. Strangely enough i was able to install Jekyll via sudo apt install jekyll. Tried that with jekyll-paginate-v2 but there's no such option. So is there any way to install it without using gem command?
ok so i found a way of solving this issue.
to install a gem you need a .gem file and since you can't access rubygems.org we will get it from github. just go to your gem's github page, download it and then open bash in that directory, type gem build gemname.gemspec and it will create a .gem file in this directory. after that just use gem install --local gemname.gem and that's it.

Ubuntu 16.04 - Cannot Open PhpMyAdmin after do full installation

I have minor problem here. I try to install phpmyadmin in my machine. Before I start install phpmyadmin, I have done installing LEMP.
Details:
Ubuntu 16.04
Nginx 1.9.15
MySQL 14.14
PHP 7.0.4
Steps for install phpmyadmin I follow here:
How To Install and Secure phpMyAdmin with Nginx on an Ubuntu 14.04 Server
After I done with installing phpmyadmin then I go to my web browser and click this http://server_domain_or_IP/phpmyadmin. It should show up interface of phpmyadmin. But mine show a pop out like this.
I do not have an idea what is happening. Hope anyone can help me.
thank you!
It seems like nginx is running but doesn't know how to handle the PHP processing. Try
service nginx restart
If that doesn't work, try making a basic PHP file in the server root, something like:
<?php echo "PHP is working"; ?>
And see if you can get that to load properly.
If you pass those two steps and still have trouble, my next guess is that the phpmyadmin site is not properly enabled. Check that the link for the site points to the right place. This talks about virtual hosts (albeit for Ubuntu 12.04 but should work):
https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-virtual-hosts-server-blocks-on-ubuntu-12-04-lts--3
If it still doesn't work, you can download the tar.gz of phpMyAdmin and manually configure to see that it gets going.

mcrypt on Cloud 9

I have a php workspace with a fresh copy of laravel. The problem i'm having is that mcrypt is missing so laravel doesn't want to work. How can I install mcrypt onto my workspace so that laravel will work?
I've tried the c9pm but it doesn't seem to be a command anymore.
The new cloud9 workspaces give you sudo rights. You can use sudo apt-get install to install the plugin you want.

Amazon EC2 - PHP GD image library

I've got a brand new install of WordPress setup and activated a custom-built theme along with a good amount of plugins. In the posts, I have built it so the user can create a post, upload an image as a thumbnail and it will automatically resize the image to a custom size set in my functions.php file.
All this has been working on my local end (MAMP) correctly but when I tried making everything work on our Amazon EC2 server, the images do not resize to the size set. They resize by actual code but do not resize the actual image and save it in the new size.
Apologies if the question/subject is completely non-sense but I have little to no experience with Amazon EC2 servers and I have been placed into a situation where the person in charge of all the work within EC2 had to leave the project.
I'm assuming that this has to do with the GD library not being installed.. I created a test page with phpinfo() and didn't see a GD area on the results page.
How would I go about installing the library on my Amazon EC2 server? I just learned how to connect to the server via Terminal and that's all I've got for now.. so you get an idea of how much I know about the subject.
I'm guessing you have some type of Linux installed, probably Ubuntu or CentOS.
Ubuntu: sudo apt-get install php5-gd
CentOS: sudo yum install php-gd
You probably have to restart Apache afterwards: service httpd restart or service apache2 restart -- the names differ from distribution to distribution.
Let me know if this works!
In my case, I was getting error like there is version conflict between different versions of php-common when I entered "yum install php-gd" so I checked my php version using "php -v" in shell and then installed the corresponding gd using "yum install php56-gd" because I had php 5.6 installed in my machine.
Hope someone will get help from this.
Cheers
to avoid compatibility problems first do:
php --version
to know your php version
the answer is something in the form PHP X.Y.Z
so you have to take X, Y and do:
sudo yum install phpXY-gd
for instance if php --version says PHP 5.5.26
you will do:
sudo yum install php55-gd
In my case of ec2 server running Amazon Linux 2 with php version 7.2.24, following was the sequence:
sudo yum install php-gd
But event after repeat server restart with
sudo systemctl restart httpd
it was not working unless I rebooted with
sudo reboot
In Amazon Linux, we have to add the following line to the etc/php.ini file
extension=gd.so
Step 1: Install the package using following command
sudo yum install php-gd
Step 2: Include the following line to the etc/php.ini file
extension=gd.so
If the line is commented, then uncomment it.
Step 3: Restart the httpd service
sudo service httpd restart

Resources