skip to Main Content

After trying several methods, I had to ask here.
So recently I was working on a site of my own which was developing on my desktop locally (using xampp), but now I want to work on the same website (locally) from my laptop (ubuntu 16.04), so I installed xampp (lampp) on my laptop and tried the following approach :-

1.) I exported the db from my desktop (localhost/phpmyadmin).
2.) Copied wordpress/wp-content folder from the desktop version.
3.) Installed xampp and wordpress on my ubuntu os laptop and logged in.
4.) Created db in localhost/phpmyadmin as wordpress and imported the desktop’s version db here.
5.) Selected wordpress as my db while installing wordpress for the first time, everything worked.
6.) Now when I copied and replaced the wp-content folder and go to localhost/wordpress, my site appears (the one which I was working on my desktop (locally)), woohoo.
7.) But when I go to localhost/wordpress/wp-admin/ , it throws error :

Fatal error: Uncaught TypeError: ftp_fput(): Argument #1 ($ftp) must be of type resource, null given in /opt/lampp/htdocs/wordpress/wp-admin/includes/class-wp-filesystem-ftpext.php:212 Stack trace: #0 /opt/lampp/htdocs/wordpress/wp-admin/includes/class-wp-filesystem-ftpext.php(212): ftp_fput(NULL, '/opt/lampp/htdo...', Resource id #934, 2) #1 /opt/lampp/htdocs/wordpress/wp-content/plugins/astra-sites/inc/classes/class-astra-sites-importer-log.php(73): WP_Filesystem_FTPext->put_contents('/opt/lampp/htdo...', '') #2 /opt/lampp/htdocs/wordpress/wp-includes/class-wp-hook.php(292): Astra_Sites_Importer_Log->has_file_read_write('') #3 /opt/lampp/htdocs/wordpress/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array) #4 /opt/lampp/htdocs/wordpress/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #5 /opt/lampp/htdocs/wordpress/wp-admin/admin.php(175): do_action('admin_init') #6 /opt/lampp/htdocs/wordpress/wp-admin/index.php(10): require_once('/opt/lampp/htdo...') #7 {main} thrown in /opt/lampp/htdocs/wordpress/wp-admin/includes/class-wp-filesystem-ftpext.php on line 212

There has been a critical error on this website. Please check your site admin email inbox for instructions.


Basically I cannot access the Dashboard.
Please guide me and tell me where did I go wrong, I’m really stuck…
Thanks in advance !

4

Answers


  1. Copy paste WordPress may issued in Critical error.
    you can use "All in one wp migration" plugin to transfer wordpress in another computer or online server easily.

    Login or Signup to reply.
  2. Assuming your Laptop install of lampp is working correctly:

    1. Download the latest wordpress zip. Unzip into htdocs
    2. Create a DB and install a fresh WP site onto your laptop
    3. While still in your blank install copy your theme into the themes folder, and install any plugins that your theme will use.
    4. In Mysql – DROP all the tables from the blank site and import your ownsite DB
    5. Change site URL & Base in WP OPtions

    Should work fine

    Login or Signup to reply.
  3. From what you describe it seems that you have mostly completed the transfer, but your FTP connection is still down. Refer the docs. You will need to search for usages of ftp_connect in your source-code. Hopefully you will find at least a match, or just a few matches. Now, look at the stack trace of the error or the location in your source-code that the error message refers to and figure out which usage of ftp_connect initiated the connection your ftp_fput tries to use and see what host it tries to connect to. Compare that value with the host your old environment uses at the same place and from here onwards you should have everything you need in order to solve the issue.

    Login or Signup to reply.
  4. I think you could use a plugin to make a backup of your WordPress Installation.
    After, you install a new WordPress on the second computer.
    You install the same backup plugin, and you restore the file, with the text, the database and the images.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search