Question

Migration of wordpress files to LEMP server, I cant find my pages, and images but themes and plugins are present

I just installed Wordpress to a LEMP server and imported my archived database into the the new database

I have also transferred my wpcontent folder which I unzipped into my wordpress folder using sudo unzip wp-content.zip -d /var/www/html

My problem is that my theme files and plugins all imported successfully but I cannot see my pages , posts or media files on my website, even though I can see the images in the uploads folder when im viewing my wordpress folder via Winscp

How can I have a complete migration of my website


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Pages posts and the location of uploaded images are all managed by the database so it sounds like you ran into an issue either with that import or with your wordpress configuration.

Since you aren’t seeing any DB connection errors my first guess is that there is a difference in the table prefix setting. Take a look at your database and make sure that the table prefix (or lack of one) is reflected in your wp-config.php file

$table_prefix = ‘wp_’;

Also, make sure that your connection settings in wp-config.php are set correctly.

@ryanpq I had to recreate my droplet to find the issue, I think it has to do with the database file I am importing

I tried to replicate my website on my notebook using xampp and it worked perfectly when i imported a zipped version of the database(.sql.gz)

Now when i try to import the zipped version into digitalocean using the command

"mysql -h localhost -u database_user -p database_name < backup_db.sql.gz "

I get this error

“ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?” ’ at line 1

I went back to import the unzipped version(.sql) and it worked, my theme folders and plugins were uploaded but I cannot find my posts or pages or media files

Please how can I troubleshoot this?, as I have searched Google for a solution without success