The effects of applied pressure on the structural, electronic, and optical properties of magnesium-incorporated wurtzite beryllium oxide (w-BeO) at different magnesium compositions are calculated. Each compound at different applied pressures confirms stability in the wurtzite phase. At different applied pressures, the equilibrium lattice constants (a(0), c(0)) increase, but the bulk modulus (B-0) and the c(0)/a(0) ratio decrease with increasing magnesium composition. With increasing pressure, the lattice constants of each specimen decrease nonlinearly. Each compound possesses a wide direct band gap (& Gcy;-& Gcy;) at different applied pressures. The calculated band gap decreases with increasing magnesium composition at different applied pressures. With an increase in applied pressure, the band gap of each compound increases. Each wurtzite specimen is optically anisotropic and exhibits birefringence. Electronic excitations from O-2p to Be-2s, 3p and Mg-3s, 3p are responsible for the various optical features of the considered alloys. At different applied pressures, static optical constants epsilon 1(0), n(0), and R(0) increase, but critical points in the epsilon(2)(omega), k(omega, sigma(omega), and alpha(omega) spectra decrease with increasing magnesium composition. For each specimen, components of static optical constants reduce, while components of critical point energies increase with an increase in applied pressure.