Migrate a self-hosted wordpress to MS Azure. Max query threshold exceeded with ClearDB - wordpress

I would like to migrate a self-hosted wordpress site to Microsoft Azure. I've already done this migration job with Duplicator plugin from a server to another and everything worked well.
The problem with Ms Azure is that it uses a service called ClearDB to manage databases. (feel free to correct me if it's wrong) When you create a free account with this service you will get a restricted plan called Mercury which allows you to query your db (max dimension of 20MB) up to 3600 queries/hour.
But the migration process requires several operations on the database and the
As written in this blog the only option is to upgrade your plan to the 10$/month subscription.
I've found another way but the plugin the author uses in this link does not work for me.
Should I use another plugin to backup my WP content?
Do you have any advice?
Thanks

There are three solutions. I chose the first one.
Configure Mysql on a virtual machine and install Wordpress (classic way)
This can be done installing an already configured image with the Lamp packages on your Virtual Machine. Please see this link
If you want to set up it manually, follow these steps:
Create the vm (I used Ubuntu 14.04) then connect via SSH to your server.
ssh root#server_ip_address
Install Apache
sudo apt-get update
sudo apt-get install apache2
To check if Apache is installed, direct your browser to your server’s IP address. The page should display the words “It works!"
Install MySQL
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
During the installation, MySQL will ask you to set a root password. Once you have installed MySQL activate it with this command:
sudo mysql_install_db
Finish up by running the MySQL set up script:
sudo /usr/bin/mysql_secure_installation
The prompt will ask you for your current root password.
Install PHP
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
PHP also has a variety of useful libraries and modules that you can add onto your virtual machine. You can see the libraries that are available.
apt-cache search php5-
Decide which module you wish to install and type:
sudo apt-get install name_of_the_module
Although LAMP is installed, we can still take a look and see the components online by creating a quick php info page. Create a new file:
sudo nano /var/www/info.php
Add in the following line. Save and exit
<?php
phpinfo();
?>
Finally restart apache
sudo service apache2 restart
and check the info page typing in your url
server_ip_address/info.php
Install mysql in a VM and create an Azure Website with a Wordpress image. Then link the mysql db on the virtual machine to the Wordpress site.
Upgrade ClearDB plan to the 10$/month subscription and specify the url of your remote db in wp-config.php

Related

Cannot install soap on wordpress on azure

I want to install a plug that requires SoapClient.
In WooCommerce -> Status I have message like that "Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected."
I spent a lot of time on it trying several ways:
1. https://social.msdn.microsoft.com/Forums/en-US/18ddb045-05ed-4ad3-aafa-a2c872ece55e/install-soap-module-for-php-72-in-web-app-for-containers-wordpress?forum=windowsazurewebsitespreview
In Azure SCM Kudu -> SSH
Later I reset the server using azure and still not working.
When I perform this action twice I get this message, but when I do a reset I can install it again.
2. How do I install soap extension?
In Azure SCM Kudu -> SSH
I cannot use sudo and apt-get
I also can't understand why I don't have root on ssh. In many examples, people have something like root#ASFF1234. I have only ASFF1234. :(
In Azure SCM Kudu -> Bash
I cannot use sudo and apt-get doesnt work.
3. https://bobcares.com/blog/woocommerce-soap-client/
yum doesn't work on SSH and bash
Would someone be able to tell me what I'm doing wrong?
Thank you in advance.

How to became superuser on AWS EC2 WordPress Site

I want to install SSL on AWS EC2 WordPress Site,
I have tried this:
bitnami#ip-172-24-0-191:/opt/bitnami/apache2/htdocs$ sudo /opt/bitnami/bncert-tool
An updated version is available. Would you like to download it? You would need to run it manually later. [Y/n]: Y
The tool will exit now. To run the updated version run the following command:
/opt/bitnami/bncert-tool
bitnami#ip-172-24-0-191:/opt/bitnami/apache2/htdocs$ /opt/bitnami/bncert-tool
but I have this error:
Error: There has been an error.
This installer requires root privileges. Please become superuser before
executing the installer
Press [Enter] to continue:
All you have to log in with AWS root user first.
Installing SSL depends on your web panel like cpanel, cyberpanel, directadmin etc.
If you have bought a SSL then install it via panel first.
If you want to install SSL via SSH access, Be sure your SSH port is open and the credentials are correct.
Your error is showing because of not root user access.
Thanks.

Installing WordPress on an AWS instance (not through AWS Marketplace)

I need help installing WordPress on my new Amazon EC2 instance.
I created it and I have SSH and SFTP working through FileZilla (using PuTTY because I'm on Windows 10). I also have my Google domain name pointing to the IPv4 address as well.
How do I install WordPress on my site now? I don't want to install it initially when setting up the instance through the AWS marketplace with bitnami or whatever.
Please follow these steps to install the WordPress in AWS:
Log in to AWS using SSH.
Go to Root Folder (/var/www/html/).
Check whether wp cli is installed or not. If not, please install. The installation guide is here.
Create a folder in the name of the project.
Get into the folder (cd folder name).
Use command wp core download (it will install the latest version).
Use command wp core config --dbname=<dbname> --dbuser=<dbuser> --dbpass=<dbpassword> --dbhost=localhost (it will create wp-config.php file)
Use command wp db create (create database in named as previous command)
Use command wp core install --url=http://<yoursiteurl> --title=<Project Name>--admin_user=<adminuser> --admin_password=<adminpassword> --admin_email="<youremailid>"
It will install WordPress in AWS. We followed the same with successful installation many times. Please find the automated script at GitHub (https://github.com/trisghosh/wordpress-automated-script). Please use the automated one after you complete at least one manual installation.

amazon ec2 micro RHEL: how to install nginx or others?

I chose micro free RHEL6.4 instance with EC2/Amazon, when I login, I found there no gcc, which I can yum install it. and there no nginx to yum install ?
I must install gcc and develop tools and download nginx source code to install ? oh ,the free is only 30Gb one month?
Check the installation page inside nginx website

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