if you created Admin login with simple user name & password like “admin” ” admin” you are not allowed to login to your wordpress admin panel

Step 1: Login to Local phpMyAdmin

Step 2: Export Local WordPress Database

In the Export Method option, you can choose “Quick” or “Custom”. Custom will provide you with more options to export your database. We recommend choosing Quick, and then click the Go button to download your database.

Step 3: Open  database sql file on text editor

 

 

Step 4: Logging Your Cpanel

Step 5: Click MySQL Databases

Step 6: create database and create a new user

Find create new database & type Your database name. click on create database button

scroll down and find MYSQL Users then type your new user name and create a password. Click create user button

click  add user to database

finally you should tick all privileges and click make change

Step 7:Back to Cpanel Home and Click phpMyAdmin

Step 8: Insert Your Database

First Select Your database name

click import tab and then click choose Your file & upload edited database file

Then click go button

Step 9: Go  to the Local Site Folder

click your My Computer or Computer or This PC then go to the file path C:\wamp64\www  find your site folder and double click site folder and then select all the files in folder and create zip file

 

 

Step 10:Back to Cpanel Home and Click file manager

Then Click  public_html 

Step 11:Upload Your Zip Folder to server

Then uploaded file right click on zip file and extract

Step 12:Find wp-config file and right click wp-config file click edit

and change  DB_NAME     DB_USER      DB_PASSWORD

It is possible to set the site URL manually in the wp-config.php file.

Add these two lines to your wp-config.php, where “yourdomain.com” is the correct location of your site.

define('WP_HOME','http://yourdomain.com');
define('WP_SITEURL','http://yourdomain.com');

13 Edit functions.php

If you have access to the site via FTP, then this method will help you quickly get a site back up and running, if you changed those values incorrectly.

1. FTP to the site, and get a copy of the active theme’s functions.php file. You’re going to edit it in a simple text editor and upload it back to the site.

2. Add these two lines to the file, immediately after the initial “<?php” line.
update_option( 'siteurl', 'http://yourdomain.com' );
update_option( 'home', 'http://yourdomain.com' );

Use your own URL instead of yourdomain.com, obviously.

3. Upload the file back to your site, in the same location. FileZilla offers a handy “edit file” function to do all of the above rapidly; if you can use that, do so.

4. Load the login or admin page a couple of times. The site should come back up.

Important! Do not leave those lines in the functions.php file. Remove them after the site is up and running again.

Note: If your theme doesn’t have a functions.php file create a new one with a text editor. Add the php tags and the two lines using your own URL instead of yourdomain.com:.

update_option( 'siteurl', 'http://yourdomain.com' );
update_option( 'home', 'http://yourdomain.com' );


Upload that to your theme directory. Remove the lines or the remove the file after the site is up and running again.