Drupal production site access issues - migration

I am unable to get access to my Drupal 7 website as I migrate it from my dev to prod servers.
The steps I followed are :
Take a SQL dump of the database
Upload Drupal site into the www/ folder available online
Create database on website with the same name
Import the SQL dump of the dev database and recreate the tables on the live database.
Make changes to settings.php as applies
Now I am not sure what changes to settings.php as applies indicates. However, when I try and access my site at say examplesite.com , I am shown SQLSTATE[280000] Access denied for user 'siteadmin#localhost' using password: YES
siteadmin#localhost is the same guy who acts as administrator on my development website and has the same password.
SO I am not sure why the same login credentials do not work for my dev site.
I also tried the credentials I have to access the control panel of my website but they do not seem to work either
Am I missing a trick here guys?
Thanks!

Recheck your settings.php twice
If correct, check if you can have a direct access your database with these credentials (via command line or phpmyadmin for example)

Related

Wordpress Database & WP Migrate

I built a WordPress website in localhost MAMP. Upon completing the site, I wanted to upload it to the actual hosting site using FTP. I uploaded all the content but DB. I used a WordPress plugin called 'WP Migrate' to export the database. Then I uploaded exported file to phpMyAdmin.
But the site did not work after uploading onto my site using FTP. I then begin to work again locally, using my local host. There is a feature to find & replace DB values in 'WP Migrate'. I replaced existing local site name with actual web site name. This stopped working my local website also.
I am not trying to figure the live site, but figure the local host site right now, that way I can perform a transfer. I believe it has to do with the DB somehow but not sure where or how to edit it.
Basically it is the same issue that this person is having as well, but the question wasn't answered: https://wordpress.org/support/topic/undo-find-replace/
Nathan Rojas
If it's after you updated your site name, you can easily change it back by logging into the myPhpAdmin of your local site and choosing the MySQL database you are using. under the wp_options table, you'll see a field called siteurl and home. Update those fields to what you had prior and it'll come back. ;)

Download files from server with WHM

I use a server with WHM. I created monthly backup, it makes full server backup to /backup folder. I can create targz file with SSH, I know how to download gziped file with pscp, but I don't know how to download it from server with link in browser. I think it's possible, because sysadmin before me did it.
Can anybody help me with that?
You want to generate a link that you can access through your browser and will be served up by the web server? (your question is a little vague)
These files are stored out of the standard web directories so you could create a symlink in the public_html folder of your website to /backups and call it something obscure so it can't be easily scraped.
So for example public_html/my-secure-backup-folder can be a symlink to /backups.
Guide on creating a symlink here: https://www.namecheap.com/support/knowledgebase/article.aspx/9561/29/how-to-create-a-symbolic-link-in-cpanel
Easiest way to proceed:
Ssh to your WHM server then decide which cpanel account you need to backup. Create a full backup for that cpanel:
cd /home/cpaneluser/public_html
/script/pkgacct cpaneluser /home/cpaneluser/public_html
chown cpaneluser:cpaneluser /home/cpaneluser/public_html/cpmove-cpaneluser.tar.gz*
Then you can download the backup using your web browser by accessing your cPanel user's domain -> http://domain.tld/cpmove-cpaneluser.tar.gz
If you don't know the actual domain for that cPanel user you can do a cat /etc/userdomains | grep cpaneluser. It will show the configure domain for that account.
That would be all.
Alternatively you can login to the cPanel account using your web browser -> http://domain.tld/cpanel using the user/password combination for that cPanel account. There is a full backup function there (in the cPanel web interface) that does pretty much what I have explained earlier.

Prevent content (files) upload to cpanel

I am new to Management System. Now I need to control a website. Some days ago, someone hack it — not SQL injection, just file change / new files upload.
I need to know the how can I prevent it; I want to learn.
Please, can someone give me some suggestions?
To prevent this, You need to update your server security with the mod_security, Mod_security is web server firewall so you will have to install and upadte mod_sec rules on your server to prevent this,
Also, Update your site scripts and plugin and themes which you are using for your site.
Use strong password for your cPanel, FTP and site admin panel
Also, Check WHM >> Security Center >> Security Advisor and fix all the Warning which you will get in that scan report.
Install maldet on your server and scan your all user home directory and remove infected files from your account.

Uploading umbraco site on server from local host

I've successfully created site using Umbraco now its time to upload it on hosting server..
i've searched and got one paid product for the same..and i dont want to use it.
Has any body tried developing Umbraco site on local and then uploading it on server?
If yes then please help me doing that.
First I run the umbraco install from a local IIS website. Then I setup my visual studio solution for that website (and my souce control). Then I work, until I reach a beta version, then I go through this process for deploying:
Ftp over to the remove website and copy the whole website (I actually use Beyond compare).
Connect to my local database with management studio and create a .bak file.
Upload the .bak file to the database server.
Restore that database
Review connection strings in web.config
Then I'm pretty much done.
Once I'm "live" and have content I don't want to lose, when I want to work on the website, I bring back the live database through a .bak file, then I make my changes. They often include DB changes since the schema is basically in the database. I note all the operations I do. Once my changes are ready I manually replicate the changes on the live site as I update the files.
This is very painfull but I tried solutions like courrier and other things like that and they are not reliable enough for production I find. Manually is the only risk free way I see for the moment.
Hope this helps.
Yes, that happens all the time. Use FTP to copy your local installation to your webserver, modify the web.config to point to the correct database and your website should be up-and-running.
I'm sure there are more elegant solutions with less clicks but here's how I do it on azure websites with sql, not sure what hosting/db you're using:
1) Create an empty db on azure with the same login and user as my local db.
2) Create an empty site on azure connected to my db.
3) Download the publishing profile.
4) Upload the db the first time with Sql Azure Migration Wizard.
5) Import the publishing profile into and upload the site with WebMatrix.
6) Thereafter I deploy the site and db with WebMatrix.
WebMatrix uses WebDeploy or FTP, you can use WebDeploy through IIS if you like, and FTP.

Cannot change files permissions on server. Could this be because my site does not have a domain name?

I am developing a site for a client who has not decided on their domain name yet. I set up an account on a web server via WHM but have not pointed any domain names to it.
All was going well until I used a plugin (TinyMCE) to try and browse files on the server - it wouldnt work so I had a look at its script files and realised their permissions are set to not executable (644). I tired to change it to executable (755) but I get an error in my FTP clients console:
550 Could not change perms on file.js: Operation not permitted
Could this be because I am accessing the server not through a specific FTP account and so the server has locked down the files?
EG: I am using the servers IP address to access files with my FTP rather then something like:
ftp.mysite.com
Any advice on this would be great! Thanks
Yes, There is an issues with the FTP account permission. You will have to login your server with the main cPanel account user name and password OR you can chnage your file permission through cPanel >> File manager